QGIS API Documentation 3.99.0-Master (e9821da5c6b)
Loading...
Searching...
No Matches
QgsPointCloudLayerProfileGeneratorBase Class Referenceabstract

Base class for the point cloud elevation profile generators. More...

#include <qgspointcloudlayerprofilegenerator.h>

Inheritance diagram for QgsPointCloudLayerProfileGeneratorBase:

Public Member Functions

 QgsPointCloudLayerProfileGeneratorBase (QgsPointCloudLayer *layer, const QgsProfileRequest &request)
 Constructor for QgsPointCloudLayerProfileGeneratorBase.
virtual ~QgsPointCloudLayerProfileGeneratorBase () override
Public Member Functions inherited from QgsAbstractProfileGenerator
virtual ~QgsAbstractProfileGenerator ()
virtual QgsFeedbackfeedback () const =0
 Access to feedback object of the generator (may be nullptr).
virtual Qgis::ProfileGeneratorFlags flags () const
 Returns flags which reflect how the profile generator operates.
virtual bool generateProfile (const QgsProfileGenerationContext &context=QgsProfileGenerationContext())=0
 Generate the profile (based on data stored in the class).
virtual QString sourceId () const =0
 Returns a unique identifier representing the source of the profile.
virtual QgsAbstractProfileResultstakeResults ()=0
 Takes results from the generator.
virtual QString type () const =0
 Returns the unique string identifier for the results type.

Protected Member Functions

bool collectData (QgsGeos &curve, const double mapUnitsPerPixel, const double maximumErrorPixels, const QgsDoubleRange &zRange, double &maxErrorInLayerCrs)
 Collects point cloud data along a curve within the specified range and tolerance.
void gatherPoints (QgsPointCloudIndex &pc, QgsPointCloudRequest &request, double maxErrorPixels, double nodeErrorPixels, const QgsDoubleRange &zRange, const QgsRectangle &searchExtent)
 Collects points from the point cloud index within the given extent and Z range.
QVector< QgsPointCloudNodeIdtraverseTree (QgsPointCloudIndex &pc, QgsPointCloudNodeId n, double maxErrorPixels, double nodeErrorPixels, const QgsDoubleRange &zRange, const QgsRectangle &searchExtent)
 Recursively traverses the point cloud node tree to gather visible nodes.
virtual void visitBlock (const QgsPointCloudBlock *block, const QgsDoubleRange &zRange)=0
 Visits a point cloud block and collects points within the given Z range and search geometry.
int visitNodesAsync (const QVector< QgsPointCloudNodeId > &nodes, QgsPointCloudIndex &pc, QgsPointCloudRequest &request, const QgsDoubleRange &zRange)
 Asynchronously visits point cloud nodes, loading their data and processing valid blocks.
int visitNodesSync (const QVector< QgsPointCloudNodeId > &nodes, QgsPointCloudIndex &pc, QgsPointCloudRequest &request, const QgsDoubleRange &zRange)
 Synchronously visits point cloud nodes and processes their data.

Protected Attributes

std::unique_ptr< QgsFeedbackmFeedback = nullptr
QString mId
QgsPointCloudIndex mIndex
QPointer< QgsPointCloudLayermLayer
QgsPointCloudAttributeCollection mLayerAttributes
QgsCoordinateTransform mLayerToTargetTransform
double mMaximumScreenError = 0.3
Qgis::RenderUnit mMaximumScreenErrorUnit = Qgis::RenderUnit::Millimeters
std::unique_ptr< QgsPreparedPointCloudRendererDatamPreparedRendererData
std::unique_ptr< QgsCurvemProfileCurve
std::unique_ptr< QgsPointCloudRenderermRenderer
std::unique_ptr< QgsGeosmSearchGeometryInLayerCrsGeometryEngine
QgsCoordinateReferenceSystem mSourceCrs
double mStepDistance = std::numeric_limits<double>::quiet_NaN()
const QVector< QgsPointCloudSubIndex > mSubIndexes
QgsCoordinateReferenceSystem mTargetCrs
double mTolerance = 0
QgsCoordinateTransformContext mTransformContext
double mZOffset = 0
double mZScale = 1.0

Detailed Description

Base class for the point cloud elevation profile generators.

Note
Not available in Python bindings
Since
QGIS 4.0

Definition at line 132 of file qgspointcloudlayerprofilegenerator.h.

Constructor & Destructor Documentation

◆ QgsPointCloudLayerProfileGeneratorBase()

QgsPointCloudLayerProfileGeneratorBase::QgsPointCloudLayerProfileGeneratorBase ( QgsPointCloudLayer * layer,
const QgsProfileRequest & request )

◆ ~QgsPointCloudLayerProfileGeneratorBase()

QgsPointCloudLayerProfileGeneratorBase::~QgsPointCloudLayerProfileGeneratorBase ( )
overridevirtualdefault

Member Function Documentation

◆ collectData()

bool QgsPointCloudLayerProfileGeneratorBase::collectData ( QgsGeos & curve,
const double mapUnitsPerPixel,
const double maximumErrorPixels,
const QgsDoubleRange & zRange,
double & maxErrorInLayerCrs )
protected

Collects point cloud data along a curve within the specified range and tolerance.

Prepares attribute requests and renderer data, then gathers points from relevant point cloud indexes. Updates the maximum allowable error in layer coordinates.

Parameters
curveSearch geometry.
mapUnitsPerPixelNumber of map units per pixel in the distance dimension.
maximumErrorPixelsMaximum permissible projected error in pixels.
zRangeVertical range filter.
maxErrorInLayerCrsOutput parameter for the derived maximum error in layer CRS.
Returns
True on success, false if canceled or an error occurred.

Definition at line 375 of file qgspointcloudlayerprofilegenerator.cpp.

◆ gatherPoints()

void QgsPointCloudLayerProfileGeneratorBase::gatherPoints ( QgsPointCloudIndex & pc,
QgsPointCloudRequest & request,
double maxErrorPixels,
double nodeErrorPixels,
const QgsDoubleRange & zRange,
const QgsRectangle & searchExtent )
protected

Collects points from the point cloud index within the given extent and Z range.

Traverses the node tree to identify relevant nodes, then loads and processes them either synchronously or asynchronously depending on the access type.

Parameters
pcPint cloud index.
requestPoint cloud data request item.
maxErrorPixelsMaximum allowed projected error in pixels.
nodeErrorPixelsNode's projected error in pixels.
zRangeVertical range filter.
searchExtentSearch extent.

Definition at line 617 of file qgspointcloudlayerprofilegenerator.cpp.

◆ traverseTree()

QVector< QgsPointCloudNodeId > QgsPointCloudLayerProfileGeneratorBase::traverseTree ( QgsPointCloudIndex & pc,
QgsPointCloudNodeId n,
double maxErrorPixels,
double nodeErrorPixels,
const QgsDoubleRange & zRange,
const QgsRectangle & searchExtent )
protected

Recursively traverses the point cloud node tree to gather visible nodes.

Filters nodes based on Z range, spatial intersection with the search extent, and screen-space error threshold. Returns all nodes that meet the criteria and contain points.

Parameters
pcPoint cloud index.
nNode ID to evaluate.
maxErrorPixelsMaximum allowed projected error in pixels.
nodeErrorPixelsNode's projected error in pixels.
zRangeVertical range filter.
searchExtentSearch extent.
Returns
List of nodes that satisfy the given constraints.

Definition at line 495 of file qgspointcloudlayerprofilegenerator.cpp.

◆ visitBlock()

virtual void QgsPointCloudLayerProfileGeneratorBase::visitBlock ( const QgsPointCloudBlock * block,
const QgsDoubleRange & zRange )
protectedpure virtual

Visits a point cloud block and collects points within the given Z range and search geometry.

Extracts point coordinates from the block, optionally filters them using the renderer, handled reprojection if needed and adds the valid points to results.

Parameters
blockPoint cloud block to process.
zRangeVertical range to include points within.

◆ visitNodesAsync()

int QgsPointCloudLayerProfileGeneratorBase::visitNodesAsync ( const QVector< QgsPointCloudNodeId > & nodes,
QgsPointCloudIndex & pc,
QgsPointCloudRequest & request,
const QgsDoubleRange & zRange )
protected

Asynchronously visits point cloud nodes, loading their data and processing valid blocks.

Requests node data asynchronously, waits for completion and calls visitBlock() for each successfully loaded block within the specified Z range.

Parameters
nodesList of nodes to process.
pcPoint cloud index.
requestPoint cloud data request item.
zRangeVertical range for filtering points.
Returns
Number of successfully processed nodes.

Definition at line 552 of file qgspointcloudlayerprofilegenerator.cpp.

◆ visitNodesSync()

int QgsPointCloudLayerProfileGeneratorBase::visitNodesSync ( const QVector< QgsPointCloudNodeId > & nodes,
QgsPointCloudIndex & pc,
QgsPointCloudRequest & request,
const QgsDoubleRange & zRange )
protected

Synchronously visits point cloud nodes and processes their data.

Loads each node’s block data sequentially, calls visitBlock() for valid blocks within the given Z range.

Parameters
nodesNodes to process.
pcPoint cloud index.
requestPoint cloud data request item.
zRangeVertical range for filtering points.
Returns
Number of successfully processed nodes.

Definition at line 532 of file qgspointcloudlayerprofilegenerator.cpp.

Member Data Documentation

◆ mFeedback

std::unique_ptr<QgsFeedback> QgsPointCloudLayerProfileGeneratorBase::mFeedback = nullptr
protected

Definition at line 241 of file qgspointcloudlayerprofilegenerator.h.

◆ mId

QString QgsPointCloudLayerProfileGeneratorBase::mId
protected

Definition at line 239 of file qgspointcloudlayerprofilegenerator.h.

◆ mIndex

QgsPointCloudIndex QgsPointCloudLayerProfileGeneratorBase::mIndex
protected

Definition at line 231 of file qgspointcloudlayerprofilegenerator.h.

◆ mLayer

QPointer< QgsPointCloudLayer > QgsPointCloudLayerProfileGeneratorBase::mLayer
protected

Definition at line 230 of file qgspointcloudlayerprofilegenerator.h.

◆ mLayerAttributes

QgsPointCloudAttributeCollection QgsPointCloudLayerProfileGeneratorBase::mLayerAttributes
protected

Definition at line 233 of file qgspointcloudlayerprofilegenerator.h.

◆ mLayerToTargetTransform

QgsCoordinateTransform QgsPointCloudLayerProfileGeneratorBase::mLayerToTargetTransform
protected

Definition at line 254 of file qgspointcloudlayerprofilegenerator.h.

◆ mMaximumScreenError

double QgsPointCloudLayerProfileGeneratorBase::mMaximumScreenError = 0.3
protected

Definition at line 236 of file qgspointcloudlayerprofilegenerator.h.

◆ mMaximumScreenErrorUnit

Qgis::RenderUnit QgsPointCloudLayerProfileGeneratorBase::mMaximumScreenErrorUnit = Qgis::RenderUnit::Millimeters
protected

Definition at line 237 of file qgspointcloudlayerprofilegenerator.h.

◆ mPreparedRendererData

std::unique_ptr< QgsPreparedPointCloudRendererData > QgsPointCloudLayerProfileGeneratorBase::mPreparedRendererData
protected

Definition at line 257 of file qgspointcloudlayerprofilegenerator.h.

◆ mProfileCurve

std::unique_ptr< QgsCurve > QgsPointCloudLayerProfileGeneratorBase::mProfileCurve
protected

Definition at line 255 of file qgspointcloudlayerprofilegenerator.h.

◆ mRenderer

std::unique_ptr< QgsPointCloudRenderer > QgsPointCloudLayerProfileGeneratorBase::mRenderer
protected

Definition at line 234 of file qgspointcloudlayerprofilegenerator.h.

◆ mSearchGeometryInLayerCrsGeometryEngine

std::unique_ptr< QgsGeos > QgsPointCloudLayerProfileGeneratorBase::mSearchGeometryInLayerCrsGeometryEngine
protected

Definition at line 258 of file qgspointcloudlayerprofilegenerator.h.

◆ mSourceCrs

QgsCoordinateReferenceSystem QgsPointCloudLayerProfileGeneratorBase::mSourceCrs
protected

Definition at line 245 of file qgspointcloudlayerprofilegenerator.h.

◆ mStepDistance

double QgsPointCloudLayerProfileGeneratorBase::mStepDistance = std::numeric_limits<double>::quiet_NaN()
protected

Definition at line 249 of file qgspointcloudlayerprofilegenerator.h.

◆ mSubIndexes

const QVector< QgsPointCloudSubIndex > QgsPointCloudLayerProfileGeneratorBase::mSubIndexes
protected

Definition at line 232 of file qgspointcloudlayerprofilegenerator.h.

◆ mTargetCrs

QgsCoordinateReferenceSystem QgsPointCloudLayerProfileGeneratorBase::mTargetCrs
protected

Definition at line 246 of file qgspointcloudlayerprofilegenerator.h.

◆ mTolerance

double QgsPointCloudLayerProfileGeneratorBase::mTolerance = 0
protected

Definition at line 243 of file qgspointcloudlayerprofilegenerator.h.

◆ mTransformContext

QgsCoordinateTransformContext QgsPointCloudLayerProfileGeneratorBase::mTransformContext
protected

Definition at line 247 of file qgspointcloudlayerprofilegenerator.h.

◆ mZOffset

double QgsPointCloudLayerProfileGeneratorBase::mZOffset = 0
protected

Definition at line 251 of file qgspointcloudlayerprofilegenerator.h.

◆ mZScale

double QgsPointCloudLayerProfileGeneratorBase::mZScale = 1.0
protected

Definition at line 252 of file qgspointcloudlayerprofilegenerator.h.


The documentation for this class was generated from the following files: