QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgsabstractprofilesurfacegenerator.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsabstractprofilesurfacegenerator.h
3  ---------------
4  begin : April 2022
5  copyright : (C) 2022 by Nyall Dawson
6  email : nyall dot dawson at gmail dot com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 #ifndef QGSABSTRACTPROFILESURFACEGENERATOR_H
18 #define QGSABSTRACTPROFILESURFACEGENERATOR_H
19 
20 #include "qgis_core.h"
21 #include "qgis_sip.h"
23 #include <memory>
24 
25 #include <qgslinesymbol.h>
26 #include <qgsfillsymbol.h>
27 
28 #define SIP_NO_FILE
29 
38 {
39  public:
40 
42 
44  QMap< double, double > mDistanceToHeightMap;
45  double minZ = std::numeric_limits< double >::max();
46  double maxZ = std::numeric_limits< double >::lowest();
47 
49  std::unique_ptr< QgsLineSymbol > mLineSymbol;
50  std::unique_ptr< QgsFillSymbol > mFillSymbol;
51 
52  QMap< double, double > distanceToHeightMap() const override;
53  QgsPointSequence sampledPoints() const override;
54  QgsDoubleRange zRange() const override;
55  QVector< QgsGeometry > asGeometries() const override;
56  QgsProfileSnapResult snapPoint( const QgsProfilePoint &point, const QgsProfileSnapContext &context ) override;
57  QVector<QgsProfileIdentifyResults> identify( const QgsProfilePoint &point, const QgsProfileIdentifyContext &context ) override;
58  void renderResults( QgsProfileRenderContext &context ) override;
59  void copyPropertiesFromGenerator( const QgsAbstractProfileGenerator *generator ) override;
60 };
61 
70 {
71  public:
72 
74 
78  Qgis::ProfileSurfaceSymbology symbology() const;
79 
83  QgsLineSymbol *lineSymbol() const;
84 
88  QgsFillSymbol *fillSymbol() const;
89 
90  protected:
91 
93  std::unique_ptr< QgsLineSymbol > mLineSymbol;
94  std::unique_ptr< QgsFillSymbol > mFillSymbol;
95 
96 };
97 
98 
99 #endif // QGSABSTRACTPROFILESURFACEGENERATOR_H
QgsProfileIdentifyContext
Encapsulates the context of identifying profile results.
Definition: qgsabstractprofilegenerator.h:125
QgsProfileSnapResult
Encapsulates results of snapping a profile point.
Definition: qgsprofilesnapping.h:56
QgsAbstractProfileSurfaceGenerator::mFillSymbol
std::unique_ptr< QgsFillSymbol > mFillSymbol
Definition: qgsabstractprofilesurfacegenerator.h:94
Qgis::ProfileSurfaceSymbology
ProfileSurfaceSymbology
Surface symbology type for elevation profile plots.
Definition: qgis.h:1849
QgsAbstractProfileGenerator
Abstract base class for objects which generate elevation profiles.
Definition: qgsabstractprofilegenerator.h:392
QgsProfileRenderContext
Abstract base class for storage of elevation profiles.
Definition: qgsabstractprofilegenerator.h:40
QgsAbstractProfileSurfaceResults::mLineSymbol
std::unique_ptr< QgsLineSymbol > mLineSymbol
Definition: qgsabstractprofilesurfacegenerator.h:49
QgsProfileSnapContext
Encapsulates the context of snapping a profile point.
Definition: qgsprofilesnapping.h:30
QgsAbstractProfileResults::identify
virtual QVector< QgsProfileIdentifyResults > identify(const QgsProfilePoint &point, const QgsProfileIdentifyContext &context)
Identify results visible at the specified profile point.
Definition: qgsabstractprofilegenerator.cpp:67
QgsAbstractProfileResults::sampledPoints
virtual QgsPointSequence sampledPoints() const =0
Returns a list of sampled points, with their calculated elevation as the point z value.
QgsProfilePoint
Encapsulates a point on a distance-elevation profile.
Definition: qgsprofilepoint.h:30
Qgis::ProfileSurfaceSymbology::Line
@ Line
The elevation surface will be rendered using a line symbol.
QgsAbstractProfileResults::copyPropertiesFromGenerator
virtual void copyPropertiesFromGenerator(const QgsAbstractProfileGenerator *generator)
Copies properties from specified generator to the results object.
Definition: qgsabstractprofilegenerator.cpp:77
QgsAbstractProfileResults::asGeometries
virtual QVector< QgsGeometry > asGeometries() const =0
Returns a list of geometries representing the calculated elevation results.
QgsAbstractProfileSurfaceResults
Abstract base class for storage of elevation profiles which represent a continuous surface (e....
Definition: qgsabstractprofilesurfacegenerator.h:37
QgsAbstractProfileSurfaceGenerator::mLineSymbol
std::unique_ptr< QgsLineSymbol > mLineSymbol
Definition: qgsabstractprofilesurfacegenerator.h:93
QgsAbstractProfileSurfaceResults::mRawPoints
QgsPointSequence mRawPoints
Definition: qgsabstractprofilesurfacegenerator.h:43
QgsAbstractProfileResults::zRange
virtual QgsDoubleRange zRange() const =0
Returns the range of the retrieved elevation values.
qgis_sip.h
QgsLineSymbol
A line symbol type, for rendering LineString and MultiLineString geometries.
Definition: qgslinesymbol.h:29
QgsAbstractProfileSurfaceResults::mFillSymbol
std::unique_ptr< QgsFillSymbol > mFillSymbol
Definition: qgsabstractprofilesurfacegenerator.h:50
QgsAbstractProfileResults::renderResults
virtual void renderResults(QgsProfileRenderContext &context)=0
Renders the results to the specified context.
QgsAbstractProfileSurfaceGenerator
Abstract base class for objects which generate elevation profiles which represent a continuous surfac...
Definition: qgsabstractprofilesurfacegenerator.h:69
QgsAbstractProfileSurfaceResults::mDistanceToHeightMap
QMap< double, double > mDistanceToHeightMap
Definition: qgsabstractprofilesurfacegenerator.h:44
QgsDoubleRange
QgsRange which stores a range of double values.
Definition: qgsrange.h:202
QgsPointSequence
QVector< QgsPoint > QgsPointSequence
Definition: qgsabstractgeometry.h:52
QgsAbstractProfileResults::distanceToHeightMap
virtual QMap< double, double > distanceToHeightMap() const =0
Returns the map of distance (chainage) to height.
QgsFillSymbol
A fill symbol type, for rendering Polygon and MultiPolygon geometries.
Definition: qgsfillsymbol.h:29
QgsAbstractProfileResults
Abstract base class for storage of elevation profiles.
Definition: qgsabstractprofilegenerator.h:193
qgsfillsymbol.h
QgsAbstractProfileResults::snapPoint
virtual QgsProfileSnapResult snapPoint(const QgsProfilePoint &point, const QgsProfileSnapContext &context)
Snaps a point to the generated elevation profile.
Definition: qgsabstractprofilegenerator.cpp:62
qgsabstractprofilegenerator.h
qgslinesymbol.h