Class: QgsAbstractProfileResults¶
Abstract base class for storage of elevation profiles.
Added in version 3.26.
Note
This is an abstract class, with methods which must be implemented by a subclass.
The following methods must be implemented: asGeometries()
, distanceToHeightMap()
, renderResults()
, sampledPoints()
, type()
, zRange()
Abstract Methods
Returns a list of geometries representing the calculated elevation results. |
|
Returns the map of distance (chainage) to height. |
|
Renders the results to the specified context. |
|
Returns a list of sampled points, with their calculated elevation as the point z value. |
|
Returns the unique string identifier for the results type. |
|
Returns the range of the retrieved elevation values |
Virtual Methods
In PyQGIS, only methods marked as virtual
can be safely overridden in a Python subclass of QgsAbstractProfileResults. See the FAQ for more details.
Returns a list of features representing the calculated elevation results. |
|
Copies properties from specified generator to the results object. |
|
Identify results visible at the specified profile point. |
|
Snaps a point to the generated elevation profile. |
- class qgis.core.QgsAbstractProfileResults[source]¶
Bases:
object
- class Feature¶
Bases:
object
Encapsulates information about a feature exported from the profile results.
Added in version 3.32.
- attributes: Dict[str, object]¶
Exported attributes
- geometry: QgsGeometry¶
Exported geometry
- layerIdentifier: str¶
Identifier for grouping output features
- virtual asFeatures(self, type: Qgis.ProfileExportType, feedback: QgsFeedback | None = None) List[QgsAbstractProfileResults.Feature] ¶
Returns a list of features representing the calculated elevation results.
The default implementation returns an empty list.
Added in version 3.32.
- Parameters:
type (Qgis.ProfileExportType)
feedback (Optional[QgsFeedback] = None)
- Return type:
- abstract asGeometries(self) List[QgsGeometry] ¶
Returns a list of geometries representing the calculated elevation results.
- Return type:
List[QgsGeometry]
- virtual copyPropertiesFromGenerator(self, generator: QgsAbstractProfileGenerator | None)[source]¶
Copies properties from specified
generator
to the results object.For instance, this method can be used to copy any properties relating to rendering the gathered results to reflect the
generator
’s current properties.The base class method does nothing.
- Parameters:
generator (Optional[QgsAbstractProfileGenerator])
- abstract distanceToHeightMap(self) Any ¶
Returns the map of distance (chainage) to height.
- Return type:
Any
- virtual identify(self, point: QgsProfilePoint, context: QgsProfileIdentifyContext) List[QgsProfileIdentifyResults] ¶
Identify results visible at the specified profile
point
.- Parameters:
point (
QgsProfilePoint
)context (
QgsProfileIdentifyContext
)
- Return type:
- virtual identify(self, distanceRange: QgsDoubleRange, elevationRange: QgsDoubleRange, context: QgsProfileIdentifyContext) List[QgsProfileIdentifyResults]
Identify results visible within the specified ranges.
- Parameters:
distanceRange (
QgsDoubleRange
)elevationRange (
QgsDoubleRange
)context (
QgsProfileIdentifyContext
)
- Return type:
- abstract renderResults(self, context: QgsProfileRenderContext)[source]¶
Renders the results to the specified
context
.- Parameters:
context (QgsProfileRenderContext)
- abstract sampledPoints(self) List[QgsPoint] [source]¶
Returns a list of sampled points, with their calculated elevation as the point z value.
- Return type:
List[QgsPoint]
- virtual snapPoint(self, point: QgsProfilePoint, context: QgsProfileSnapContext) QgsProfileSnapResult [source]¶
Snaps a
point
to the generated elevation profile.- Parameters:
point (QgsProfilePoint)
context (QgsProfileSnapContext)
- Return type:
- abstract type(self) str [source]¶
Returns the unique string identifier for the results type.
- Return type:
str
- abstract zRange(self) QgsDoubleRange [source]¶
Returns the range of the retrieved elevation values
- Return type: