QGIS/python/core/auto_generated/pointcloud/qgspointclouddataprovider.sip.in
2024-12-03 09:26:55 +01:00

240 lines
7.5 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/pointcloud/qgspointclouddataprovider.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsPointCloudDataProvider: QgsDataProvider
{
%Docstring(signature="appended")
Base class for providing data for :py:class:`QgsPointCloudLayer`
Responsible for reading native point cloud data and returning the indexed data.
.. note::
The API is considered EXPERIMENTAL and can be changed without a notice
.. versionadded:: 3.18
%End
%TypeHeaderCode
#include "qgspointclouddataprovider.h"
%End
public:
enum Capability
{
NoCapabilities,
ReadLayerMetadata,
WriteLayerMetadata,
CreateRenderer,
ContainSubIndexes,
};
typedef QFlags<QgsPointCloudDataProvider::Capability> Capabilities;
enum PointCloudIndexGenerationState
{
NotIndexed,
Indexing,
Indexed
};
QgsPointCloudDataProvider( const QString &uri,
const QgsDataProvider::ProviderOptions &providerOptions,
Qgis::DataProviderReadFlags flags = Qgis::DataProviderReadFlags() );
%Docstring
Ctor
%End
~QgsPointCloudDataProvider();
SIP_PYLIST identify( float maxErrorInMapCoords, QgsGeometry extentGeometry, const QgsDoubleRange extentZRange = QgsDoubleRange(), int pointsLimit = 1000 );
%Docstring
Returns the list of points of the point cloud according to a zoom level
defined by ``maxError`` (in layer coordinates), an extent ``geometry`` in the 2D plane
and a range ``extentZRange`` for z values. The function will try to limit
the number of points returned to ``pointsLimit`` points
.. note::
this function does not handle elevation properties and you need to
change elevation coordinates yourself after returning from the function
%End
%MethodCode
{
QVector<QMap<QString, QVariant>> res = sipCpp->identify( a0, *a1, *a2, a3 );
sipRes = PyList_New( res.size() );
for ( int i = 0; i < res.size(); ++i )
{
PyObject *dict = PyDict_New();
for ( QString key : res[i].keys() )
{
PyObject *keyObj = sipConvertFromNewType( new QString( key ), sipType_QString, Py_None );
PyObject *valObj = sipConvertFromNewType( new QVariant( res[i][key] ), sipType_QVariant, Py_None );
PyDict_SetItem( dict, keyObj, valObj );
}
PyList_SET_ITEM( sipRes, i, dict );
}
}
%End
virtual QgsPointCloudDataProvider::Capabilities capabilities() const;
%Docstring
Returns flags containing the supported capabilities for the data provider.
%End
virtual QgsPointCloudAttributeCollection attributes() const = 0;
%Docstring
Returns the attributes available from this data provider.
May return empty collection until :py:func:`~QgsPointCloudDataProvider.pointCloudIndexLoaded` is emitted
%End
virtual void loadIndex( ) = 0;
%Docstring
Triggers loading of the point cloud index
.. seealso:: :py:func:`index`
%End
virtual void generateIndex( ) = 0;
%Docstring
Triggers generation of the point cloud index
emits :py:func:`~QgsPointCloudDataProvider.indexGenerationStateChanged`
.. seealso:: :py:func:`index`
%End
virtual PointCloudIndexGenerationState indexingState( ) = 0;
%Docstring
Gets the current index generation state
%End
bool hasValidIndex() const;
%Docstring
Returns whether provider has index which is valid
%End
virtual qint64 pointCount() const = 0;
%Docstring
Returns the total number of points available in the dataset.
%End
virtual QgsGeometry polygonBounds() const;
%Docstring
Returns the polygon bounds of the layer. The CRS of the returned geometry will match the provider's :py:func:`~QgsPointCloudDataProvider.crs`.
This method will return the best approximation for the actual bounds of points contained in the
dataset available from the provider's metadata. This may match the bounding box rectangle returned
by :py:func:`~QgsPointCloudDataProvider.extent`, or for some datasets a "convex hull" style polygon representing a more precise bounds
will be returned.
This method will not attempt to calculate the data bounds, rather it will return only whatever precomputed bounds
are included in the data source's metadata.
%End
virtual QVariantMap originalMetadata() const;
%Docstring
Returns a representation of the original metadata included in a point cloud dataset.
This is a free-form dictionary of values, the contents and structure of which will vary by provider and
dataset.
%End
virtual QgsPointCloudRenderer *createRenderer( const QVariantMap &configuration = QVariantMap() ) const /Factory/;
%Docstring
Creates a new 2D point cloud renderer, using provider backend specific information.
The ``configuration`` map can be used to pass provider-specific configuration maps to the provider to
allow customization of the returned renderer. Support and format of ``configuration`` varies by provider.
When called with an empty ``configuration`` map the provider's default renderer will be returned.
This method returns a new renderer and the caller takes ownership of the returned object.
Only providers which report the CreateRenderer capability will return a 2D renderer. Other
providers will return ``None``.
%End
QgsPointCloudStatistics metadataStatistics();
%Docstring
Returns the object containing the statistics metadata extracted from the dataset
.. versionadded:: 3.26
%End
virtual bool supportsSubsetString() const;
virtual QString subsetStringDialect() const;
virtual QString subsetStringHelpUrl() const;
virtual QString subsetString() const;
virtual bool setSubsetString( const QString &subset, bool updateFeatureCount = false );
static QMap< int, QString > lasClassificationCodes();
%Docstring
Returns the map of LAS classification code to untranslated string value, corresponding to the ASPRS Standard
Lidar Point Classes.
.. seealso:: :py:func:`translatedLasClassificationCodes`
%End
static QMap< int, QString > translatedLasClassificationCodes();
%Docstring
Returns the map of LAS classification code to translated string value, corresponding to the ASPRS Standard
Lidar Point Classes.
.. seealso:: :py:func:`lasClassificationCodes`
%End
static QMap< int, QString > dataFormatIds();
%Docstring
Returns the map of LAS data format ID to untranslated string value.
.. seealso:: :py:func:`translatedDataFormatIds`
%End
static QMap< int, QString > translatedDataFormatIds();
%Docstring
Returns the map of LAS data format ID to translated string value.
.. seealso:: :py:func:`dataFormatIds`
%End
signals:
void indexGenerationStateChanged( QgsPointCloudDataProvider::PointCloudIndexGenerationState state );
%Docstring
Emitted when point cloud generation state is changed
%End
protected:
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/pointcloud/qgspointclouddataprovider.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/