Class: QgsAbstractProfileSource¶
Interface for classes which can generate 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: createProfileGenerator()
Class Hierarchy¶
Subclasses¶
Represents a vector layer which manages a vector based dataset. |
|
Represents a mesh layer supporting display of data on structured or unstructured meshes. |
|
Represents a map layer supporting display of point clouds. |
|
Represents a raster layer. |
Abstract Methods
Given a profile request, returns a new profile generator ready for generating elevation profiles. |
Virtual Methods
In PyQGIS, only methods marked as virtual
can be safely overridden in a Python subclass of QgsAbstractProfileSource. See the FAQ for more details.
Returns a unique identifier for this profile source. |
|
Returns a name for displaying this profile source in the elevation profile layer tree. |
- class qgis.core.QgsAbstractProfileSource[source]¶
Bases:
object
- abstract createProfileGenerator(self, request: QgsProfileRequest) QgsAbstractProfileGenerator | None [source]¶
Given a profile
request
, returns a new profile generator ready for generating elevation profiles.The caller takes ownership of the returned generator.
May return
None
if the source cannot generate a profile at this time.- Parameters:
request (QgsProfileRequest)
- Return type:
Optional[QgsAbstractProfileGenerator]
- virtual profileSourceId(self) str [source]¶
Returns a unique identifier for this profile source.
For map layer sources, the source ID will match the layer’s
QgsMapLayer.id()
. Other (non-map-layer) sources will have a different unique ID with its own custom interpretation.Added in version 4.0.0.
- Return type:
str
- virtual profileSourceName(self) str [source]¶
Returns a name for displaying this profile source in the elevation profile layer tree.
For map layer sources, the name displayed in the elevation profile tree will be taken from and synchronized to the layer’s name.
Added in version 4.0.0.
- Return type:
str