18 #ifndef QGSPOINTCLOUDDATAPROVIDER_H
19 #define QGSPOINTCLOUDDATAPROVIDER_H
21 #include "qgis_core.h"
56 ReadLayerMetadata = 1 << 0,
57 WriteLayerMetadata = 1 << 1,
58 CreateRenderer = 1 << 2,
61 Q_DECLARE_FLAGS( Capabilities, Capability )
76 QgsDataProvider::ReadFlags flags = QgsDataProvider::ReadFlags() );
110 QVector<QMap<QString, QVariant>> res = sipCpp->identify( a0, *a1, *a2, a3 );
111 sipRes = PyList_New( res.size() );
112 for (
int i = 0; i < res.size(); ++i )
114 PyObject *dict = PyDict_New();
115 for ( QString key : res[i].keys() )
117 PyObject *keyObj = sipConvertFromNewType(
new QString( key ), sipType_QString, Py_None );
118 PyObject *valObj = sipConvertFromNewType(
new QVariant( res[i][key] ), sipType_QVariant, Py_None );
119 PyDict_SetItem( dict, keyObj, valObj );
121 PyList_SET_ITEM( sipRes, i, dict );
130 virtual QgsPointCloudDataProvider::Capabilities capabilities()
const;
172 bool hasValidIndex()
const;
198 virtual QVariantMap originalMetadata()
const;
242 const QVariant res = sipCpp->metadataStatistic( *a0, a1 );
243 if ( !res.isValid() )
245 PyErr_SetString( PyExc_ValueError, QStringLiteral(
"Statistic is not available" ).toUtf8().constData() );
250 QVariant *v =
new QVariant( res );
251 sipRes = sipConvertFromNewType( v, sipType_QVariant, Py_None );
265 virtual QVariantList metadataClasses(
const QString &attribute )
const;
295 const QVariant res = sipCpp->metadataClassStatistic( *a0, *a1, a2 );
296 if ( !res.isValid() )
298 PyErr_SetString( PyExc_ValueError, QStringLiteral(
"Statistic is not available" ).toUtf8().constData() );
303 QVariant *v =
new QVariant( res );
304 sipRes = sipConvertFromNewType( v, sipType_QVariant, Py_None );
316 static QMap< int, QString > lasClassificationCodes();
324 static QMap< int, QString > translatedLasClassificationCodes();
331 static QMap< int, QString > dataFormatIds();
338 static QMap< int, QString > translatedDataFormatIds();
Represents a indexed point cloud node in octree.
Abstract base class for spatial data provider implementations.
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.
virtual void generateIndex()=0
Triggers generation of the point cloud index.
virtual QgsPointCloudIndex * index() const
Returns the point cloud index associated with the provider.
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.
PointCloudIndexGenerationState
Point cloud index state.
virtual PointCloudIndexGenerationState indexingState()=0
Gets the current index generation state.
void indexGenerationStateChanged(PointCloudIndexGenerationState state)
Emitted when point cloud generation state is changed.
Represents a indexed point clouds data in octree.
Abstract base class for 2d point cloud renderers.
Statistic
Enumeration of flags that specify statistics to be calculated.
Setting options for creating vector data providers.