18 #ifndef QGSPOINTCLOUDDATAPROVIDER_H
19 #define QGSPOINTCLOUDDATAPROVIDER_H
21 #include "qgis_core.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;
140 virtual void loadIndex( ) = 0;
149 virtual void generateIndex( ) = 0;
155 virtual PointCloudIndexGenerationState indexingState( ) = 0;
169 bool hasValidIndex()
const;
174 virtual qint64 pointCount()
const = 0;
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;
371 #endif // QGSMESHDATAPROVIDER_H