QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgspointclouddataprovider.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgspointclouddataprovider.cpp
3  -----------------------
4  begin : October 2020
5  copyright : (C) 2020 by Peter Petrik
6  email : zilolv at gmail dot com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #include "qgis.h"
20 #include "qgspointcloudindex.h"
21 #include "qgsgeometry.h"
22 #include "qgspointcloudrequest.h"
23 #include "qgsgeometryengine.h"
25 
26 #include <mutex>
27 #include <QDebug>
28 #include <QtMath>
29 
30 #include <QtConcurrent/QtConcurrentMap>
31 
33  const QString &uri,
34  const QgsDataProvider::ProviderOptions &options,
35  QgsDataProvider::ReadFlags flags )
36  : QgsDataProvider( uri, options, flags )
37 {
38 }
39 
41 
42 QgsPointCloudDataProvider::Capabilities QgsPointCloudDataProvider::capabilities() const
43 {
45 }
46 
48 {
49  QgsPointCloudIndex *lIndex = index();
50  return lIndex && lIndex->isValid();
51 }
52 
54 {
55  return QgsGeometry::fromRect( extent() );
56 }
57 
59 {
60  return QVariantMap();
61 }
62 
64 {
65  return nullptr;
66 }
67 
69 {
70  static QMap< int, QString > sCodes
71  {
72  {0, QStringLiteral( "Created, Never Classified" )},
73  {1, QStringLiteral( "Unclassified" )},
74  {2, QStringLiteral( "Ground" )},
75  {3, QStringLiteral( "Low Vegetation" )},
76  {4, QStringLiteral( "Medium Vegetation" )},
77  {5, QStringLiteral( "High Vegetation" )},
78  {6, QStringLiteral( "Building" )},
79  {7, QStringLiteral( "Low Point (Low Noise)" )},
80  {8, QStringLiteral( "Reserved" )},
81  {9, QStringLiteral( "Water" )},
82  {10, QStringLiteral( "Rail" )},
83  {11, QStringLiteral( "Road Surface" )},
84  {12, QStringLiteral( "Reserved" )},
85  {13, QStringLiteral( "Wire - Guard (Shield)" )},
86  {14, QStringLiteral( "Wire - Conductor (Phase)" )},
87  {15, QStringLiteral( "Transmission Tower" )},
88  {16, QStringLiteral( "Wire-Structure Connector (Insulator)" )},
89  {17, QStringLiteral( "Bridge Deck" )},
90  {18, QStringLiteral( "High Noise" )},
91  };
92 
93  static std::once_flag initialized;
94  std::call_once( initialized, [ = ]( )
95  {
96  for ( int i = 19; i <= 63; ++i )
97  sCodes.insert( i, QStringLiteral( "Reserved" ) );
98  for ( int i = 64; i <= 255; ++i )
99  sCodes.insert( i, QStringLiteral( "User Definable" ) );
100  } );
101 
102  return sCodes;
103 }
104 
106 {
107  static QMap< int, QString > sCodes
108  {
109  {0, QObject::tr( "Created, Never Classified" )},
110  {1, QObject::tr( "Unclassified" )},
111  {2, QObject::tr( "Ground" )},
112  {3, QObject::tr( "Low Vegetation" )},
113  {4, QObject::tr( "Medium Vegetation" )},
114  {5, QObject::tr( "High Vegetation" )},
115  {6, QObject::tr( "Building" )},
116  {7, QObject::tr( "Low Point (Noise)" )},
117  {8, QObject::tr( "Reserved" )},
118  {9, QObject::tr( "Water" )},
119  {10, QObject::tr( "Rail" )},
120  {11, QObject::tr( "Road Surface" )},
121  {12, QObject::tr( "Reserved" )},
122  {13, QObject::tr( "Wire - Guard (Shield)" )},
123  {14, QObject::tr( "Wire - Conductor (Phase)" )},
124  {15, QObject::tr( "Transmission Tower" )},
125  {16, QObject::tr( "Wire-Structure Connector (Insulator)" )},
126  {17, QObject::tr( "Bridge Deck" )},
127  {18, QObject::tr( "High Noise" )},
128  };
129 
130  static std::once_flag initialized;
131  std::call_once( initialized, [ = ]( )
132  {
133  for ( int i = 19; i <= 63; ++i )
134  sCodes.insert( i, QObject::tr( "Reserved" ) );
135  for ( int i = 64; i <= 255; ++i )
136  sCodes.insert( i, QObject::tr( "User Definable" ) );
137  } );
138 
139  return sCodes;
140 }
141 
143 {
144  static const QMap< int, QString > sCodes
145  {
146  {0, QStringLiteral( "No color or time stored" )},
147  {1, QStringLiteral( "Time is stored" )},
148  {2, QStringLiteral( "Color is stored" )},
149  {3, QStringLiteral( "Color and time are stored" )},
150  {6, QStringLiteral( "Time is stored" )},
151  {7, QStringLiteral( "Time and color are stored)" )},
152  {8, QStringLiteral( "Time, color and near infrared are stored" )},
153  };
154 
155  return sCodes;
156 }
157 
159 {
160  static const QMap< int, QString > sCodes
161  {
162  {0, QObject::tr( "No color or time stored" )},
163  {1, QObject::tr( "Time is stored" )},
164  {2, QObject::tr( "Color is stored" )},
165  {3, QObject::tr( "Color and time are stored" )},
166  {6, QObject::tr( "Time is stored" )},
167  {7, QObject::tr( "Time and color are stored)" )},
168  {8, QObject::tr( "Time, color and near infrared are stored" )},
169  };
170 
171  return sCodes;
172 }
173 
175 {
176  return index() && index()->hasStatisticsMetadata();
177 }
178 
179 QVariant QgsPointCloudDataProvider::metadataStatistic( const QString &attribute, QgsStatisticalSummary::Statistic statistic ) const
180 {
181  QgsPointCloudIndex *pcIndex = index();
182  if ( pcIndex )
183  {
184  return pcIndex->metadataStatistic( attribute, statistic );
185  }
186  return QVariant();
187 }
188 
189 QVariantList QgsPointCloudDataProvider::metadataClasses( const QString &attribute ) const
190 {
191  QgsPointCloudIndex *pcIndex = index();
192  if ( pcIndex )
193  {
194  return pcIndex->metadataClasses( attribute );
195  }
196  return QVariantList();
197 }
198 
199 QVariant QgsPointCloudDataProvider::metadataClassStatistic( const QString &attribute, const QVariant &value, QgsStatisticalSummary::Statistic statistic ) const
200 {
201  QgsPointCloudIndex *pcIndex = index();
202  if ( pcIndex )
203  {
204  return pcIndex->metadataClassStatistic( attribute, value, statistic );
205  }
206  return QVariant();
207 }
208 
209 
211 {
212  QgsPointCloudIndex *pcIndex = index();
213  if ( pcIndex )
214  {
215  return pcIndex->metadataStatistics();
216  }
217  return QgsPointCloudStatistics();
218 }
219 
221 {
222  typedef QVector<QMap<QString, QVariant>> result_type;
223 
224  MapIndexedPointCloudNode( QgsPointCloudRequest &request, const QgsVector3D &indexScale, const QgsVector3D &indexOffset,
225  const QgsGeometry &extentGeometry, const QgsDoubleRange &zRange, QgsPointCloudIndex *index, int pointsLimit )
226  : mRequest( request ), mIndexScale( indexScale ), mIndexOffset( indexOffset ), mExtentGeometry( extentGeometry ), mZRange( zRange ), mIndex( index ), mPointsLimit( pointsLimit )
227  { }
228 
229  QVector<QVariantMap> operator()( IndexedPointCloudNode n )
230  {
231  QVector<QVariantMap> acceptedPoints;
232  std::unique_ptr<QgsPointCloudBlock> block( mIndex->nodeData( n, mRequest ) );
233 
234  if ( !block || pointsCount == mPointsLimit )
235  return acceptedPoints;
236 
237  const char *ptr = block->data();
238  const QgsPointCloudAttributeCollection blockAttributes = block->attributes();
239  const std::size_t recordSize = blockAttributes.pointRecordSize();
240  int xOffset = 0, yOffset = 0, zOffset = 0;
241  const QgsPointCloudAttribute::DataType xType = blockAttributes.find( QStringLiteral( "X" ), xOffset )->type();
242  const QgsPointCloudAttribute::DataType yType = blockAttributes.find( QStringLiteral( "Y" ), yOffset )->type();
243  const QgsPointCloudAttribute::DataType zType = blockAttributes.find( QStringLiteral( "Z" ), zOffset )->type();
244  std::unique_ptr< QgsGeometryEngine > extentEngine( QgsGeometry::createGeometryEngine( mExtentGeometry.constGet() ) );
245  extentEngine->prepareGeometry();
246  for ( int i = 0; i < block->pointCount() && pointsCount < mPointsLimit; ++i )
247  {
248  double x, y, z;
249  QgsPointCloudAttribute::getPointXYZ( ptr, i, recordSize, xOffset, xType, yOffset, yType, zOffset, zType, block->scale(), block->offset(), x, y, z );
250  QgsPoint point( x, y );
251 
252  if ( mZRange.contains( z ) && extentEngine->contains( &point ) )
253  {
254  QVariantMap pointAttr = QgsPointCloudAttribute::getAttributeMap( ptr, i * recordSize, blockAttributes );
255  pointAttr[ QStringLiteral( "X" ) ] = x;
256  pointAttr[ QStringLiteral( "Y" ) ] = y;
257  pointAttr[ QStringLiteral( "Z" ) ] = z;
258  pointsCount++;
259  acceptedPoints.push_back( pointAttr );
260  }
261  }
262  return acceptedPoints;
263  }
264 
272  int pointsCount = 0;
273 };
274 
276  double maxError,
277  const QgsGeometry &extentGeometry,
278  const QgsDoubleRange &extentZRange, int pointsLimit )
279 {
280  QVector<QVariantMap> acceptedPoints;
281 
282  QgsPointCloudIndex *index = this->index();
283  const IndexedPointCloudNode root = index->root();
284 
285  const QgsRectangle rootNodeExtent = index->nodeMapExtent( root );
286  const double rootError = rootNodeExtent.width() / index->span();
287 
288  const QVector<IndexedPointCloudNode> nodes = traverseTree( index, root, maxError, rootError, extentGeometry, extentZRange );
289 
290  const QgsPointCloudAttributeCollection attributeCollection = index->attributes();
291  QgsPointCloudRequest request;
292  request.setAttributes( attributeCollection );
293 
294  acceptedPoints = QtConcurrent::blockingMappedReduced( nodes,
295  MapIndexedPointCloudNode( request, index->scale(), index->offset(), extentGeometry, extentZRange, index, pointsLimit ),
296  qOverload<const QVector<QMap<QString, QVariant>>&>( &QVector<QMap<QString, QVariant>>::append ),
297  QtConcurrent::UnorderedReduce );
298 
299  return acceptedPoints;
300 }
301 
302 QVector<IndexedPointCloudNode> QgsPointCloudDataProvider::traverseTree(
303  const QgsPointCloudIndex *pc,
305  double maxError,
306  double nodeError,
307  const QgsGeometry &extentGeometry,
308  const QgsDoubleRange &extentZRange )
309 {
310  QVector<IndexedPointCloudNode> nodes;
311 
312  const QgsDoubleRange nodeZRange = pc->nodeZRange( n );
313  if ( !extentZRange.overlaps( nodeZRange ) )
314  return nodes;
315 
316  if ( !extentGeometry.intersects( pc->nodeMapExtent( n ) ) )
317  return nodes;
318 
319  nodes.append( n );
320 
321  const double childrenError = nodeError / 2.0;
322  if ( childrenError < maxError )
323  return nodes;
324 
325  const QList<IndexedPointCloudNode> children = pc->nodeChildren( n );
326  for ( const IndexedPointCloudNode &nn : children )
327  {
328  if ( extentGeometry.intersects( pc->nodeMapExtent( nn ) ) )
329  nodes += traverseTree( pc, nn, maxError, childrenError, extentGeometry, extentZRange );
330  }
331 
332  return nodes;
333 }
334 
335 bool QgsPointCloudDataProvider::setSubsetString( const QString &subset, bool updateFeatureCount )
336 {
337  Q_UNUSED( updateFeatureCount )
338  const auto i = index();
339  if ( !i )
340  return false;
341 
342  if ( !i->setSubsetString( subset ) )
343  return false;
344  mSubsetString = subset;
345  emit dataChanged();
346  return true;
347 }
348 
350 {
351  return mSubsetString;
352 }
353 
QgsPointCloudIndex::nodeMapExtent
QgsRectangle nodeMapExtent(const IndexedPointCloudNode &node) const
Returns the extent of a node in map coordinates.
Definition: qgspointcloudindex.cpp:216
QgsPointCloudIndex::offset
QgsVector3D offset() const
Returns offset.
Definition: qgspointcloudindex.cpp:237
QgsPointCloudDataProvider::originalMetadata
virtual QVariantMap originalMetadata() const
Returns a representation of the original metadata included in a point cloud dataset.
Definition: qgspointclouddataprovider.cpp:58
QgsPointCloudDataProvider::identify
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...
Definition: qgspointclouddataprovider.cpp:275
MapIndexedPointCloudNode
Definition: qgspointclouddataprovider.cpp:220
QgsPointCloudAttribute::DataType
DataType
Systems of unit measurement.
Definition: qgspointcloudattribute.h:44
QgsDataProvider::ProviderOptions
Setting options for creating vector data providers.
Definition: qgsdataprovider.h:107
QgsPointCloudAttributeCollection::find
const QgsPointCloudAttribute * find(const QString &attributeName, int &offset) const
Finds the attribute with the name.
Definition: qgspointcloudattribute.cpp:168
QgsDataProvider
Abstract base class for spatial data provider implementations.
Definition: qgsdataprovider.h:40
QgsPointCloudIndex::nodeData
virtual QgsPointCloudBlock * nodeData(const IndexedPointCloudNode &n, const QgsPointCloudRequest &request)=0
Returns node data block.
QgsRange::overlaps
bool overlaps(const QgsRange< T > &other) const
Returns true if this range overlaps another range.
Definition: qgsrange.h:147
QgsPoint
Point geometry type, with support for z-dimension and m-values.
Definition: qgspoint.h:48
QgsVector3D
Class for storage of 3D vectors similar to QVector3D, with the difference that it uses double precisi...
Definition: qgsvector3d.h:31
QgsPointCloudDataProvider::metadataStatistics
QgsPointCloudStatistics metadataStatistics()
Returns the object containings the statistics metadata extracted from the dataset.
Definition: qgspointclouddataprovider.cpp:210
QgsPointCloudIndex::nodeChildren
virtual QList< IndexedPointCloudNode > nodeChildren(const IndexedPointCloudNode &n) const
Returns all children of node.
Definition: qgspointcloudindex.cpp:172
QgsPointCloudDataProvider::translatedDataFormatIds
static QMap< int, QString > translatedDataFormatIds()
Returns the map of LAS data format ID to translated string value.
Definition: qgspointclouddataprovider.cpp:158
qgis.h
QgsPointCloudStatistics
Class used to store statistics of a point cloud dataset.
Definition: qgspointcloudstatistics.h:61
QgsPointCloudDataProvider::subsetString
QString subsetString() const override
Returns the subset definition string (typically sql) currently in use by the layer and used by the pr...
Definition: qgspointclouddataprovider.cpp:349
MapIndexedPointCloudNode::mIndexOffset
QgsVector3D mIndexOffset
Definition: qgspointclouddataprovider.cpp:267
QgsPointCloudDataProvider::hasStatisticsMetadata
virtual bool hasStatisticsMetadata() const
Returns whether the dataset contains statistics metadata.
Definition: qgspointclouddataprovider.cpp:174
MapIndexedPointCloudNode::mRequest
QgsPointCloudRequest & mRequest
Definition: qgspointclouddataprovider.cpp:265
QgsDataProvider::dataChanged
void dataChanged()
Emitted whenever a change is made to the data provider which may have caused changes in the provider'...
QgsPointCloudIndex::attributes
QgsPointCloudAttributeCollection attributes() const
Returns all attributes that are stored in the file.
Definition: qgspointcloudindex.cpp:192
QgsPointCloudDataProvider::metadataStatistic
virtual QVariant metadataStatistic(const QString &attribute, QgsStatisticalSummary::Statistic statistic) const
Returns a statistic for the specified attribute, taken only from the metadata of the point cloud data...
Definition: qgspointclouddataprovider.cpp:179
QgsPointCloudIndex::isValid
virtual bool isValid() const =0
Returns whether index is loaded and valid.
QgsRectangle
A rectangle specified with double values.
Definition: qgsrectangle.h:41
QgsPointCloudRequest
Point cloud data request.
Definition: qgspointcloudrequest.h:39
IndexedPointCloudNode
Represents a indexed point cloud node in octree.
Definition: qgspointcloudindex.h:57
QgsPointCloudDataProvider::createRenderer
virtual QgsPointCloudRenderer * createRenderer(const QVariantMap &configuration=QVariantMap()) const
Creates a new 2D point cloud renderer, using provider backend specific information.
Definition: qgspointclouddataprovider.cpp:63
qgsgeometryengine.h
QgsGeometry::intersects
bool intersects(const QgsRectangle &rectangle) const
Returns true if this geometry exactly intersects with a rectangle.
Definition: qgsgeometry.cpp:1255
MapIndexedPointCloudNode::result_type
QVector< QMap< QString, QVariant > > result_type
Definition: qgspointclouddataprovider.cpp:222
QgsPointCloudDataProvider::polygonBounds
virtual QgsGeometry polygonBounds() const
Returns the polygon bounds of the layer.
Definition: qgspointclouddataprovider.cpp:53
QgsPointCloudAttributeCollection::attributes
QVector< QgsPointCloudAttribute > attributes() const
Returns all attributes.
Definition: qgspointcloudattribute.cpp:163
QgsPointCloudAttributeCollection::pointRecordSize
int pointRecordSize() const
Returns total size of record.
Definition: qgspointcloudattribute.h:187
QgsPointCloudIndex::metadataStatistics
virtual QgsPointCloudStatistics metadataStatistics() const
Returns the object containings the statistics metadata extracted from the dataset.
Definition: qgspointcloudindex.cpp:323
QgsPointCloudDataProvider::hasValidIndex
bool hasValidIndex() const
Returns whether provider has index which is valid.
Definition: qgspointclouddataprovider.cpp:47
QgsPointCloudDataProvider::~QgsPointCloudDataProvider
~QgsPointCloudDataProvider() override
QgsPointCloudIndex::hasStatisticsMetadata
virtual bool hasStatisticsMetadata() const =0
Returns whether the dataset contains metadata of statistics.
QgsPointCloudAttributeCollection
Collection of point cloud attributes.
Definition: qgspointcloudattribute.h:141
MapIndexedPointCloudNode::MapIndexedPointCloudNode
MapIndexedPointCloudNode(QgsPointCloudRequest &request, const QgsVector3D &indexScale, const QgsVector3D &indexOffset, const QgsGeometry &extentGeometry, const QgsDoubleRange &zRange, QgsPointCloudIndex *index, int pointsLimit)
Definition: qgspointclouddataprovider.cpp:224
QgsPointCloudDataProvider::metadataClassStatistic
virtual QVariant metadataClassStatistic(const QString &attribute, const QVariant &value, QgsStatisticalSummary::Statistic statistic) const
Returns a statistic for one class value from the specified attribute, taken only from the metadata of...
Definition: qgspointclouddataprovider.cpp:199
QgsPointCloudIndex::scale
QgsVector3D scale() const
Returns scale.
Definition: qgspointcloudindex.cpp:232
QgsPointCloudIndex::root
IndexedPointCloudNode root()
Returns root node of the index.
Definition: qgspointcloudindex.h:227
QgsPointCloudAttribute::getAttributeMap
static QVariantMap getAttributeMap(const char *data, std::size_t recordOffset, const QgsPointCloudAttributeCollection &attributeCollection)
Retrieves all the attributes of a point.
Definition: qgspointcloudattribute.cpp:270
QgsGeometry::constGet
const QgsAbstractGeometry * constGet() const SIP_HOLDGIL
Returns a non-modifiable (const) reference to the underlying abstract geometry primitive.
Definition: qgsgeometry.cpp:136
QgsPointCloudDataProvider::setSubsetString
bool setSubsetString(const QString &subset, bool updateFeatureCount=false) override
Set the subset string used to create a subset of features in the layer.
Definition: qgspointclouddataprovider.cpp:335
qgspointcloudstatscalculator.h
qgspointcloudindex.h
MapIndexedPointCloudNode::mZRange
const QgsDoubleRange & mZRange
Definition: qgspointclouddataprovider.cpp:269
QgsPointCloudIndex::metadataClasses
virtual QVariantList metadataClasses(const QString &attribute) const
Returns the classes of attribute.
Definition: qgspointcloudindex.cpp:309
QgsStatisticalSummary::Statistic
Statistic
Enumeration of flags that specify statistics to be calculated.
Definition: qgsstatisticalsummary.h:48
QgsPointCloudDataProvider::NoCapabilities
@ NoCapabilities
Provider has no capabilities.
Definition: qgspointclouddataprovider.h:56
QgsGeometry::createGeometryEngine
static QgsGeometryEngine * createGeometryEngine(const QgsAbstractGeometry *geometry)
Creates and returns a new geometry engine representing the specified geometry.
Definition: qgsgeometry.cpp:3972
QgsDoubleRange
QgsRange which stores a range of double values.
Definition: qgsrange.h:202
qgsgeometry.h
QgsGeometry
A geometry is the spatial representation of a feature.
Definition: qgsgeometry.h:124
QgsRectangle::width
double width() const SIP_HOLDGIL
Returns the width of the rectangle.
Definition: qgsrectangle.h:223
QgsPointCloudRequest::setAttributes
void setAttributes(const QgsPointCloudAttributeCollection &attributes)
Set attributes filter in the request.
Definition: qgspointcloudrequest.cpp:29
QgsDataProvider::extent
virtual QgsRectangle extent() const =0
Returns the extent of the layer.
QgsPointCloudIndex::metadataStatistic
virtual QVariant metadataStatistic(const QString &attribute, QgsStatisticalSummary::Statistic statistic) const
Returns the statistic statistic of attribute.
Definition: qgspointcloudindex.cpp:289
QgsGeometry::fromRect
static QgsGeometry fromRect(const QgsRectangle &rect) SIP_HOLDGIL
Creates a new geometry from a QgsRectangle.
Definition: qgsgeometry.cpp:241
QgsPointCloudDataProvider::metadataClasses
virtual QVariantList metadataClasses(const QString &attribute) const
Returns a list of existing classes which are present for the specified attribute, taken only from the...
Definition: qgspointclouddataprovider.cpp:189
qgspointclouddataprovider.h
QgsPointCloudRenderer
Abstract base class for 2d point cloud renderers.
Definition: qgspointcloudrenderer.h:296
MapIndexedPointCloudNode::operator()
QVector< QVariantMap > operator()(IndexedPointCloudNode n)
Definition: qgspointclouddataprovider.cpp:229
MapIndexedPointCloudNode::mIndexScale
QgsVector3D mIndexScale
Definition: qgspointclouddataprovider.cpp:266
QgsPointCloudIndex::span
int span() const
Returns the number of points in one direction in a single node.
Definition: qgspointcloudindex.cpp:247
MapIndexedPointCloudNode::mPointsLimit
int mPointsLimit
Definition: qgspointclouddataprovider.cpp:271
QgsRange::contains
bool contains(const QgsRange< T > &other) const
Returns true if this range contains another range.
Definition: qgsrange.h:108
QgsPointCloudIndex
Represents a indexed point clouds data in octree.
Definition: qgspointcloudindex.h:163
QgsPointCloudDataProvider::capabilities
virtual QgsPointCloudDataProvider::Capabilities capabilities() const
Returns flags containing the supported capabilities for the data provider.
Definition: qgspointclouddataprovider.cpp:42
qgspointcloudrequest.h
MapIndexedPointCloudNode::mIndex
QgsPointCloudIndex * mIndex
Definition: qgspointclouddataprovider.cpp:270
QgsPointCloudDataProvider::QgsPointCloudDataProvider
QgsPointCloudDataProvider(const QString &uri, const QgsDataProvider::ProviderOptions &providerOptions, QgsDataProvider::ReadFlags flags=QgsDataProvider::ReadFlags())
Ctor.
Definition: qgspointclouddataprovider.cpp:32
QgsPointCloudDataProvider::dataFormatIds
static QMap< int, QString > dataFormatIds()
Returns the map of LAS data format ID to untranslated string value.
Definition: qgspointclouddataprovider.cpp:142
QgsPointCloudDataProvider::translatedLasClassificationCodes
static QMap< int, QString > translatedLasClassificationCodes()
Returns the map of LAS classification code to translated string value, corresponding to the ASPRS Sta...
Definition: qgspointclouddataprovider.cpp:105
QgsPointCloudAttribute::getPointXYZ
static void getPointXYZ(const char *ptr, int i, std::size_t pointRecordSize, int xOffset, QgsPointCloudAttribute::DataType xType, int yOffset, QgsPointCloudAttribute::DataType yType, int zOffset, QgsPointCloudAttribute::DataType zType, const QgsVector3D &indexScale, const QgsVector3D &indexOffset, double &x, double &y, double &z)
Retrieves the x, y, z values for the point at index i.
Definition: qgspointcloudattribute.cpp:255
QgsPointCloudIndex::nodeZRange
QgsDoubleRange nodeZRange(const IndexedPointCloudNode &node) const
Returns the z range of a node.
Definition: qgspointcloudindex.cpp:221
MapIndexedPointCloudNode::pointsCount
int pointsCount
Definition: qgspointclouddataprovider.cpp:272
QgsPointCloudDataProvider::index
virtual QgsPointCloudIndex * index() const
Returns the point cloud index associated with the provider.
Definition: qgspointclouddataprovider.h:164
QgsPointCloudDataProvider::lasClassificationCodes
static QMap< int, QString > lasClassificationCodes()
Returns the map of LAS classification code to untranslated string value, corresponding to the ASPRS S...
Definition: qgspointclouddataprovider.cpp:68
QgsPointCloudIndex::metadataClassStatistic
virtual QVariant metadataClassStatistic(const QString &attribute, const QVariant &value, QgsStatisticalSummary::Statistic statistic) const
Returns the statistic statistic of the class value of the attribute attribute.
Definition: qgspointcloudindex.cpp:315
MapIndexedPointCloudNode::mExtentGeometry
const QgsGeometry & mExtentGeometry
Definition: qgspointclouddataprovider.cpp:268
QgsPointCloudAttribute::type
DataType type() const
Returns the data type.
Definition: qgspointcloudattribute.h:74