From dbe92214875d0fee3f4447f22501891ad2e89b5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Ko=C5=88a=C5=99=C3=ADk?= Date: Fri, 29 Nov 2024 13:25:23 +0100 Subject: [PATCH] Minor changes per review --- .../pointcloud/qgspointcloudstatistics.sip.in | 3 +++ .../pointcloud/qgspointcloudstatistics.sip.in | 3 +++ src/core/pointcloud/qgscopcpointcloudindex.h | 4 ++-- src/core/pointcloud/qgseptpointcloudindex.h | 4 ++-- src/core/pointcloud/qgspointcloudstatistics.h | 6 +++++- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/python/PyQt6/core/auto_generated/pointcloud/qgspointcloudstatistics.sip.in b/python/PyQt6/core/auto_generated/pointcloud/qgspointcloudstatistics.sip.in index 29f15a551c128..f2d213bd823cd 100644 --- a/python/PyQt6/core/auto_generated/pointcloud/qgspointcloudstatistics.sip.in +++ b/python/PyQt6/core/auto_generated/pointcloud/qgspointcloudstatistics.sip.in @@ -18,9 +18,12 @@ struct QgsPointCloudAttributeStatistics double mean; double stDev; int count; + int singleClassCount( int cls ) const; %Docstring Returns the count of points in given class or -1 on error + +.. versionadded:: 3.42 %End }; diff --git a/python/core/auto_generated/pointcloud/qgspointcloudstatistics.sip.in b/python/core/auto_generated/pointcloud/qgspointcloudstatistics.sip.in index 29f15a551c128..f2d213bd823cd 100644 --- a/python/core/auto_generated/pointcloud/qgspointcloudstatistics.sip.in +++ b/python/core/auto_generated/pointcloud/qgspointcloudstatistics.sip.in @@ -18,9 +18,12 @@ struct QgsPointCloudAttributeStatistics double mean; double stDev; int count; + int singleClassCount( int cls ) const; %Docstring Returns the count of points in given class or -1 on error + +.. versionadded:: 3.42 %End }; diff --git a/src/core/pointcloud/qgscopcpointcloudindex.h b/src/core/pointcloud/qgscopcpointcloudindex.h index b54bf474f61f2..a5a9be56306ae 100644 --- a/src/core/pointcloud/qgscopcpointcloudindex.h +++ b/src/core/pointcloud/qgscopcpointcloudindex.h @@ -52,7 +52,7 @@ class CORE_EXPORT QgsCopcPointCloudIndex: public QgsPointCloudIndex void load( const QString &fileName ) override; bool hasNode( const QgsPointCloudNodeId &n ) const override; - virtual QgsPointCloudNode getNode( const QgsPointCloudNodeId &id ) const override; + QgsPointCloudNode getNode( const QgsPointCloudNodeId &id ) const override; std::unique_ptr< QgsPointCloudBlock> nodeData( const QgsPointCloudNodeId &n, const QgsPointCloudRequest &request ) override; QgsPointCloudBlockRequest *asyncNodeData( const QgsPointCloudNodeId &n, const QgsPointCloudRequest &request ) override; @@ -76,7 +76,7 @@ class CORE_EXPORT QgsCopcPointCloudIndex: public QgsPointCloudIndex * If the dataset doesn't contain statistics EVLR, an object with 0 samples will be returned. * \since QGIS 3.42 */ - virtual QgsPointCloudStatistics metadataStatistics() const override; + QgsPointCloudStatistics metadataStatistics() const override; /** * Copies common properties to the \a destination index diff --git a/src/core/pointcloud/qgseptpointcloudindex.h b/src/core/pointcloud/qgseptpointcloudindex.h index 382e269cb843f..d49a7c120f7fe 100644 --- a/src/core/pointcloud/qgseptpointcloudindex.h +++ b/src/core/pointcloud/qgseptpointcloudindex.h @@ -52,9 +52,9 @@ class CORE_EXPORT QgsEptPointCloudIndex: public QgsPointCloudIndex QgsCoordinateReferenceSystem crs() const override; qint64 pointCount() const override; - virtual QgsPointCloudNode getNode( const QgsPointCloudNodeId &id ) const override; + QgsPointCloudNode getNode( const QgsPointCloudNodeId &id ) const override; QVariantMap originalMetadata() const override { return mOriginalMetadata; } - virtual QgsPointCloudStatistics metadataStatistics() const override; + QgsPointCloudStatistics metadataStatistics() const override; bool isValid() const override; QgsPointCloudIndex::AccessType accessType() const override; diff --git a/src/core/pointcloud/qgspointcloudstatistics.h b/src/core/pointcloud/qgspointcloudstatistics.h index faf2be9a274d5..7517cf9baaeda 100644 --- a/src/core/pointcloud/qgspointcloudstatistics.h +++ b/src/core/pointcloud/qgspointcloudstatistics.h @@ -48,7 +48,11 @@ struct CORE_EXPORT QgsPointCloudAttributeStatistics //! Updates the current point cloud statistics to hold the cumulation of the current statistics and \a stats void cumulateStatistics( const QgsPointCloudAttributeStatistics &stats ); #endif - //! Returns the count of points in given class or -1 on error + + /** + * Returns the count of points in given class or -1 on error + * \since QGIS 3.42 + */ int singleClassCount( int cls ) const; };