QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
17 #ifndef QGSVECTORLAYERPROFILEGENERATOR_H
18 #define QGSVECTORLAYERPROFILEGENERATOR_H
20 #include "qgis_core.h"
67 QHash< QgsFeatureId, QVector< Feature > >
features;
71 bool respectLayerSymbology =
true;
73 bool mShowMarkerSymbolInSurfacePlots =
false;
75 QString
type()
const override;
88 void visitFeaturesAtPoint(
const QgsProfilePoint &point,
double maximumPointDistanceDelta,
double maximumPointElevationDelta,
double maximumSurfaceElevationDelta,
89 const std::function<
void(
QgsFeatureId,
double delta,
double distance,
double elevation ) > &visitor,
bool visitWithin );
121 bool generateProfileForPoints();
122 bool generateProfileForLines();
123 bool generateProfileForPolygons();
125 double terrainHeight(
double x,
double y );
126 double featureZToHeight(
double x,
double y,
double z,
double offset );
129 bool clampAltitudes(
QgsPolygon *polygon,
double offset );
132 std::unique_ptr<QgsFeedback> mFeedback =
nullptr;
134 std::unique_ptr< QgsCurve > mProfileCurve;
135 std::unique_ptr< QgsGeos > mProfileCurveEngine;
137 std::unique_ptr< QgsAbstractTerrainProvider > mTerrainProvider;
139 std::unique_ptr< QgsCurve > mTransformedCurve;
140 double mTolerance = 0;
148 std::unique_ptr< QgsVectorLayerFeatureSource > mSource;
155 bool mExtrusionEnabled =
false;
156 double mExtrusionHeight = 0;
166 std::unique_ptr< QgsVectorLayerProfileResults > mResults;
168 bool mRespectLayerSymbology =
true;
169 std::unique_ptr< QgsMarkerSymbol > mProfileMarkerSymbol;
170 bool mShowMarkerSymbolInSurfacePlots =
false;
173 QPointer< QgsVectorLayer > mLayer;
179 #endif // QGSVECTORLAYERPROFILEGENERATOR_H
Encapsulates the context of identifying profile results.
Abstract base class for curved geometry type.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
@ Terrain
Elevation is clamped to terrain (final elevation = terrain elevation)
void copyPropertiesFromGenerator(const QgsAbstractProfileGenerator *generator) override
Copies properties from specified generator to the results object.
Contains information about the context in which a coordinate transform is executed.
Point geometry type, with support for z-dimension and m-values.
@ Centroid
Clamp just centroid of feature.
void renderResults(QgsProfileRenderContext &context) override
Renders the results to the specified context.
QPointer< QgsVectorLayer > mLayer
CORE_EXPORT QgsMeshVertex centroid(const QgsMeshFace &face, const QVector< QgsMeshVertex > &vertices)
Returns the centroid of the face.
Encapsulates results of snapping a profile point.
Container of fields for a vector layer.
Abstract base class for objects which generate elevation profiles.
Abstract base class for storage of elevation profiles.
Type
The WKB type describes the number of dimensions a geometry has.
std::unique_ptr< QgsMarkerSymbol > mMarkerSymbol
Line string geometry type, with support for z-dimension and m-values.
Encapsulates the context of snapping a profile point.
QgsGeometry geometry
Feature's geometry with any terrain height adjustment and extrusion applied.
A rectangle specified with double values.
Encapsulates a point on a distance-elevation profile.
Encapsulates the context in which an elevation profile is to be generated.
QVector< QgsGeometry > asGeometries() const override
Returns a list of geometries representing the calculated elevation results.
Abstract base class for storage of elevation profiles which represent a continuous surface (e....
AltitudeBinding
Altitude binding.
Implementation of QgsAbstractProfileResults for vector layers.
QgsProfileSnapResult snapPoint(const QgsProfilePoint &point, const QgsProfileSnapContext &context) override
Snaps a point to the generated elevation profile.
Base class for feedback objects to be used for cancellation of something running in a worker thread.
virtual QgsFeedback * feedback() const =0
Access to feedback object of the generator (may be nullptr)
Does vector analysis using the geos library and handles import, export, exception handling*.
@ IndividualFeatures
Treat each feature as an individual object (eg buildings)
VectorProfileType
Types of elevation profiles to generate for vector sources.
Encapsulates properties and constraints relating to fetching elevation profiles from different source...
QVector< QgsProfileIdentifyResults > identify(const QgsProfilePoint &point, const QgsProfileIdentifyContext &context) override
Identify results visible at the specified profile point.
This class represents a coordinate reference system (CRS).
Abstract base class for objects which generate elevation profiles which represent a continuous surfac...
QgsGeometry crossSectionGeometry
Cross section distance vs height geometry for feature.
Implementation of QgsAbstractProfileGenerator for vector layers.
QgsFeatureId featureId
Original feature ID.
A grouped map of multiple QgsProperty objects, each referenced by a integer key value.
QgsRange which stores a range of double values.
A geometry is the spatial representation of a feature.
Represents a vector layer which manages a vector based data sets.
Partial snapshot of vector layer's state (only the members necessary for access to features)
QHash< QgsFeatureId, QVector< Feature > > features
virtual QString type() const =0
Returns the unique string identifier for the results type.
Abstract base class for storage of elevation profiles.
Abstract base class for terrain providers.
virtual QgsAbstractProfileResults * takeResults()=0
Takes results from the generator.
AltitudeClamping
Altitude clamping.
virtual QString sourceId() const =0
Returns a unique identifier representing the source of the profile.
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features
virtual bool generateProfile(const QgsProfileGenerationContext &context=QgsProfileGenerationContext())=0
Generate the profile (based on data stored in the class).