mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-24 00:05:18 -05:00
Expose point cloud class statistics to Python
This commit is contained in:
parent
8745c936b0
commit
f2afd6a498
@ -18,6 +18,10 @@ 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
|
||||
%End
|
||||
};
|
||||
|
||||
class QgsPointCloudStatistics
|
||||
|
||||
@ -18,6 +18,10 @@ 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
|
||||
%End
|
||||
};
|
||||
|
||||
class QgsPointCloudStatistics
|
||||
|
||||
@ -50,6 +50,11 @@ void QgsPointCloudAttributeStatistics::cumulateStatistics( const QgsPointCloudAt
|
||||
}
|
||||
}
|
||||
|
||||
int QgsPointCloudAttributeStatistics::singleClassCount( int cls ) const
|
||||
{
|
||||
return classCount.value( cls, -1 );
|
||||
}
|
||||
|
||||
// QgsPointCloudStatistics
|
||||
|
||||
QgsPointCloudStatistics::QgsPointCloudStatistics()
|
||||
|
||||
@ -48,6 +48,8 @@ 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
|
||||
int singleClassCount( int cls ) const;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user