18#ifndef QGSPOINTCLOUDDATAPROVIDER_H
19#define QGSPOINTCLOUDDATAPROVIDER_H
104 QVector<QMap<QString, QVariant>> res = sipCpp->identify( a0, *a1, *a2, a3 );
105 sipRes = PyList_New( res.size() );
106 for (
int i = 0; i < res.size(); ++i )
108 PyObject *dict = PyDict_New();
109 for ( QString key : res[i].keys() )
111 PyObject *keyObj = sipConvertFromNewType(
new QString( key ), sipType_QString, Py_None );
112 PyObject *valObj = sipConvertFromNewType(
new QVariant( res[i][key] ), sipType_QVariant, Py_None );
113 PyDict_SetItem( dict, keyObj, valObj );
115 PyList_SET_ITEM( sipRes, i, dict );
169 virtual QVector<QgsPointCloudSubIndex>
subIndexes()
SIP_SKIP {
return QVector<QgsPointCloudSubIndex>(); }
184 bool hasValidIndex()
const;
237 bool setSubsetString( const QString &subset,
bool updateFeatureCount = false ) override;
QFlags< DataProviderReadFlag > DataProviderReadFlags
Flags which control data provider construction.
QgsDataProvider(const QString &uri=QString(), const QgsDataProvider::ProviderOptions &providerOptions=QgsDataProvider::ProviderOptions(), Qgis::DataProviderReadFlags flags=Qgis::DataProviderReadFlags())
Create a new dataprovider with the specified in the uri.
QgsRange which stores a range of double values.
A geometry is the spatial representation of a feature.
A collection of point cloud attributes.
Base class for providing data for QgsPointCloudLayer.
QString subsetStringDialect() const override
Returns a user-friendly string describing the dialect which is supported for subset strings by the pr...
Capability
Capabilities that providers may implement.
@ CreateRenderer
Provider can create 2D renderers using backend-specific formatting information. See QgsPointCloudData...
@ ChangeAttributeValues
Provider can modify the values of point attributes.
@ WriteLayerMetadata
Provider can write layer metadata to the data store. See QgsDataProvider::writeLayerMetadata().
@ ReadLayerMetadata
Provider can read layer metadata from data store.
@ NoCapabilities
Provider has no capabilities.
@ ContainSubIndexes
Provider can contain multiple indexes. Virtual point cloud files for example.
bool setSubsetString(const QString &subset, bool updateFeatureCount=false) override
Set the subset string used to create a subset of features in the layer.
~QgsPointCloudDataProvider() override
QgsPointCloudDataProvider(const QString &uri, const QgsDataProvider::ProviderOptions &providerOptions, Qgis::DataProviderReadFlags flags=Qgis::DataProviderReadFlags())
Ctor.
virtual QgsPointCloudAttributeCollection attributes() const =0
Returns the attributes available from this data provider.
static QMap< int, QString > dataFormatIds()
Returns the map of LAS data format ID to untranslated string value.
bool supportsSubsetString() const override
Returns true if the provider supports setting of subset strings.
virtual QVector< QgsPointCloudSubIndex > subIndexes()
Returns a list of sub indexes available if the provider supports multiple indexes,...
virtual void generateIndex()=0
Triggers generation of the point cloud index.
QVector< QVariantMap > identify(double maxError, const QgsGeometry &extentGeometry, const QgsDoubleRange &extentZRange=QgsDoubleRange(), int pointsLimit=1000)
Returns the list of points of the point cloud according to a zoom level defined by maxError (in layer...
QgsPointCloudStatistics metadataStatistics()
Returns the object containing the statistics metadata extracted from the dataset.
virtual QgsPointCloudIndex index() const
Returns the point cloud index associated with the provider.
QString subsetStringHelpUrl() const override
Returns a URL pointing to documentation describing the dialect which is supported for subset strings ...
virtual void loadSubIndex(int n)
Triggers loading of the point cloud index for the n th sub index.
virtual void loadIndex()=0
Triggers loading of the point cloud index.
QString subsetString() const override
Returns the subset definition string currently in use by the layer and used by the provider to limit ...
static QMap< int, QString > translatedDataFormatIds()
Returns the map of LAS data format ID to translated string value.
virtual qint64 pointCount() const =0
Returns the total number of points available in the dataset.
static QMap< int, QString > translatedLasClassificationCodes()
Returns the map of LAS classification code to translated string value, corresponding to the ASPRS Sta...
QString mSubsetString
String used to define a subset of the layer.
void indexGenerationStateChanged(QgsPointCloudDataProvider::PointCloudIndexGenerationState state)
Emitted when point cloud generation state is changed.
static QMap< int, QString > lasClassificationCodes()
Returns the map of LAS classification code to untranslated string value, corresponding to the ASPRS S...
PointCloudIndexGenerationState
Point cloud index state.
@ NotIndexed
Provider has no index available.
@ Indexing
Provider try to index the source data.
@ Indexed
The index is ready to be used.
QFlags< Capability > Capabilities
virtual PointCloudIndexGenerationState indexingState()=0
Gets the current index generation state.
virtual QgsPointCloudRenderer * createRenderer(const QVariantMap &configuration=QVariantMap()) const
Creates a new 2D point cloud renderer, using provider backend specific information.
virtual QVariantMap originalMetadata() const
Returns a representation of the original metadata included in a point cloud dataset.
virtual QgsGeometry polygonBounds() const
Returns the polygon bounds of the layer.
Smart pointer for QgsAbstractPointCloudIndex.
Represents an indexed point cloud node's position in octree.
Keeps metadata for an indexed point cloud node.
Abstract base class for 2d point cloud renderers.
Used to store statistics of a point cloud dataset.
#define SIP_ENUM_BASETYPE(type)
Setting options for creating vector data providers.