17#ifndef QGSABSTRACTPROFILEGENERATOR_H
18#define QGSABSTRACTPROFILEGENERATOR_H
60 const QTransform &worldTransform()
const;
69 void setWorldTransform(
const QTransform &transform );
111 QTransform mWorldTransform;
129 double maximumSurfaceDistanceDelta = 0;
132 double maximumSurfaceElevationDelta = 0;
135 double maximumPointDistanceDelta = 0;
138 double maximumPointElevationDelta = 0;
141 double displayRatioElevationVsDistance = 1;
176 QVector<QVariantMap>
results()
const {
return mResults; }
180 QPointer< QgsMapLayer > mLayer =
nullptr;
182 QVector<QVariantMap> mResults;
201 virtual QString
type()
const = 0;
340 void setDpi(
double dpi ) { mDpi = dpi; }
347 double dpi()
const {
return mDpi; }
359 double mMaxErrorMapUnits = std::numeric_limits< double >::quiet_NaN();
360 double mMapUnitsPerDistancePixel = 1;
409 virtual Qgis::ProfileGeneratorFlags flags()
const;
RenderUnit
Rendering size units.
Abstract base class for objects which generate elevation profiles.
virtual QgsAbstractProfileResults * takeResults()=0
Takes results from the generator.
virtual QgsFeedback * feedback() const =0
Access to feedback object of the generator (may be nullptr)
virtual QString sourceId() const =0
Returns a unique identifier representing the source of the profile.
virtual ~QgsAbstractProfileGenerator()
virtual bool generateProfile(const QgsProfileGenerationContext &context=QgsProfileGenerationContext())=0
Generate the profile (based on data stored in the class).
Abstract base class for storage of elevation profiles.
virtual QgsDoubleRange zRange() const =0
Returns the range of the retrieved elevation values.
virtual void renderResults(QgsProfileRenderContext &context)=0
Renders the results to the specified context.
virtual QMap< double, double > distanceToHeightMap() const =0
Returns the map of distance (chainage) to height.
virtual QString type() const =0
Returns the unique string identifier for the results type.
virtual ~QgsAbstractProfileResults()
virtual QgsPointSequence sampledPoints() const =0
Returns a list of sampled points, with their calculated elevation as the point z value.
virtual QVector< QgsGeometry > asGeometries() const =0
Returns a list of geometries representing the calculated elevation results.
QgsRange which stores a range of double values.
Base class for feedback objects to be used for cancellation of something running in a worker thread.
A geometry is the spatial representation of a feature.
Base class for all map layer types.
Encapsulates the context in which an elevation profile is to be generated.
double maximumErrorMapUnits() const
Returns the maximum allowed error in the generated result, in profile curve map units.
double dpi() const
Returns the DPI (dots per inch) for the profie, to be used in size conversions.
double mapUnitsPerDistancePixel() const
Returns the number of map units per pixel in the distance dimension.
void setDpi(double dpi)
Sets the dpi (dots per inch) for the profie, to be used in size conversions.
void setMaximumErrorMapUnits(double error)
Sets the maximum allowed error in the generated result, in profile curve map units.
QgsDoubleRange elevationRange() const
Returns the range of elevations to include in the generation.
void setDistanceRange(const QgsDoubleRange &range)
Sets the range of distances to include in the generation.
QgsDoubleRange distanceRange() const
Returns the range of distances to include in the generation.
void setElevationRange(const QgsDoubleRange &range)
Sets the range of elevations to include in the generation.
void setMapUnitsPerDistancePixel(double units)
Sets the number of map units per pixel in the distance dimension.
Encapsulates the context of identifying profile results.
Stores identify results generated by a QgsAbstractProfileResults object.
QVector< QVariantMap > results() const
Returns a list of custom attributes representing the identify results.
QgsMapLayer * layer() const
Returns the associated map layer.
Encapsulates a point on a distance-elevation profile.
Abstract base class for storage of elevation profiles.
QgsRenderContext & renderContext()
Returns a reference to the component QgsRenderContext.
Encapsulates the context of snapping a profile point.
Encapsulates results of snapping a profile point.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Contains information about the context of a rendering operation.
QVector< QgsPoint > QgsPointSequence
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)