18#ifndef QGSPOINTCLOUDDATAPROVIDER_H
19#define QGSPOINTCLOUDDATAPROVIDER_H
57 ReadLayerMetadata = 1 << 0,
58 WriteLayerMetadata = 1 << 1,
59 CreateRenderer = 1 << 2,
62 Q_DECLARE_FLAGS( Capabilities, Capability )
77 QgsDataProvider::ReadFlags flags = QgsDataProvider::ReadFlags() );
107 QVector<QMap<QString, QVariant>> res = sipCpp->identify( a0, *a1, *a2, a3 );
108 sipRes = PyList_New( res.size() );
109 for (
int i = 0; i < res.size(); ++i )
111 PyObject *dict = PyDict_New();
112 for ( QString key : res[i].keys() )
114 PyObject *keyObj = sipConvertFromNewType(
new QString( key ), sipType_QString, Py_None );
115 PyObject *valObj = sipConvertFromNewType(
new QVariant( res[i][key] ), sipType_QVariant, Py_None );
116 PyDict_SetItem( dict, keyObj, valObj );
118 PyList_SET_ITEM( sipRes, i, dict );
127 virtual QgsPointCloudDataProvider::Capabilities capabilities()
const;
169 bool hasValidIndex()
const;
195 virtual QVariantMap originalMetadata()
const;
217 virtual
bool hasStatisticsMetadata() const;
247 const QVariant res = sipCpp->metadataStatistic( *a0, a1 );
248 if ( !res.isValid() )
250 PyErr_SetString( PyExc_ValueError, QStringLiteral(
"Statistic is not available" ).toUtf8().constData() );
255 QVariant *v =
new QVariant( res );
256 sipRes = sipConvertFromNewType( v, sipType_QVariant, Py_None );
270 virtual QVariantList metadataClasses(
const QString &attribute )
const;
301 const QVariant res = sipCpp->metadataClassStatistic( *a0, *a1, a2 );
302 if ( !res.isValid() )
304 PyErr_SetString( PyExc_ValueError, QStringLiteral(
"Statistic is not available" ).toUtf8().constData() );
309 QVariant *v =
new QVariant( res );
310 sipRes = sipConvertFromNewType( v, sipType_QVariant, Py_None );
325 bool setSubsetString(
const QString &subset,
bool updateFeatureCount =
false )
override;
333 static QMap< int, QString > lasClassificationCodes();
341 static QMap< int, QString > translatedLasClassificationCodes();
348 static QMap< int, QString > dataFormatIds();
355 static QMap< int, QString > translatedDataFormatIds();
368 QString mSubsetString;
Represents a indexed point cloud node in octree.
Abstract base class for spatial data provider implementations.
virtual QString subsetString() const
Returns the subset definition string (typically sql) currently in use by the layer and used by the pr...
virtual bool setSubsetString(const QString &subset, bool updateFeatureCount=true)
Set the subset string used to create a subset of features in the layer.
QgsRange which stores a range of double values.
A geometry is the spatial representation of a feature.
Collection of point cloud attributes.
Base class for providing data for QgsPointCloudLayer.
Capability
Capabilities that providers may implement.
~QgsPointCloudDataProvider() override
virtual QgsPointCloudAttributeCollection attributes() const =0
Returns the attributes available from this data provider.
bool supportsSubsetString() const override
Returns true if the provider supports setting of subset strings.
virtual void generateIndex()=0
Triggers generation of the point cloud index.
virtual void loadIndex()=0
Triggers loading of the point cloud index.
virtual qint64 pointCount() const =0
Returns the total number of points available in the dataset.
void indexGenerationStateChanged(QgsPointCloudDataProvider::PointCloudIndexGenerationState state)
Emitted when point cloud generation state is changed.
PointCloudIndexGenerationState
Point cloud index state.
virtual QgsPointCloudIndex * index() const
Returns the point cloud index associated with the provider.
virtual PointCloudIndexGenerationState indexingState()=0
Gets the current index generation state.
Represents a indexed point clouds data in octree.
Abstract base class for 2d point cloud renderers.
Class used to store statistics of a point cloud dataset.
Statistic
Enumeration of flags that specify statistics to be calculated.
Setting options for creating vector data providers.