Class: QgsLayoutItemElevationProfile¶
A layout item subclass for elevation profile plots.
Added in version 3.30.
Class Hierarchy¶
Base classes¶
Base class for graphical items within a |
|
A base class for objects which belong to a layout. |
|
Abstract interface for generating an expression context. |
|
Interface for layout objects which support undo/redo commands. |
Methods
Returns whether the profile curve is set to follow the current atlas feature. |
|
Returns the desired Coordinate Reference System for the profile. |
|
Returns the units for the distance axis. |
|
Returns the list of map layers participating in the elevation profile. |
|
Returns a reference to the elevation plot object, which can be used to set plot appearance and properties. |
|
Returns the cross section profile curve, which represents the line along which the profile should be generated. |
|
Returns the profile request used to generate the elevation profile. |
|
Sets whether the profile curve will follow the current atlas feature. |
|
Sets the desired Coordinate Reference System (crs) for the profile. |
|
Sets the unit for the distance axis. |
|
Sets the list of map layers participating in the elevation profile. |
|
Sets the cross section profile curve, which represents the line along which the profile should be generated. |
|
Sets the list of sources participating in the elevation profile. |
|
Sets the symbol used to draw the subsections. |
|
Sets the tolerance of the request (in |
|
Returns the list of sources participating in the elevation profile. |
|
Returns the symbol used to draw the subsections. |
|
Returns the tolerance of the request (in |
Static Methods
Returns a new elevation profile item for the specified layout. |
Signals
Emitted whenever the item's preview has been refreshed. |
- class qgis.core.QgsLayoutItemElevationProfile[source]¶
Bases:
QgsLayoutItem- __init__(layout: QgsLayout | None)
Constructor for QgsLayoutItemElevationProfile, with the specified parent
layout.- Parameters:
layout (Optional[QgsLayout])
- atlasDriven(self) bool[source]¶
Returns whether the profile curve is set to follow the current atlas feature.
See also
- Return type:
bool
- static create(layout: QgsLayout | None) QgsLayoutItemElevationProfile | None[source]¶
Returns a new elevation profile item for the specified
layout.The caller takes responsibility for deleting the returned object.
- Parameters:
layout (Optional[QgsLayout])
- Return type:
Optional[QgsLayoutItemElevationProfile]
- crs(self) QgsCoordinateReferenceSystem[source]¶
Returns the desired Coordinate Reference System for the profile.
This also represents the CRS associated with the
profileCurve().See also
- Return type:
- distanceUnit(self) Qgis.DistanceUnit[source]¶
Returns the units for the distance axis.
See also
Added in version 3.32.
- Return type:
- layers(self) List[QgsMapLayer]¶
Returns the list of map layers participating in the elevation profile.
See also
- Return type:
List[QgsMapLayer]
- plot(self) Qgs2DXyPlot | None[source]¶
Returns a reference to the elevation plot object, which can be used to set plot appearance and properties.
- Return type:
Optional[Qgs2DXyPlot]
- signal previewRefreshed[source]¶
Emitted whenever the item’s preview has been refreshed.
Added in version 3.34.
- profileCurve(self) QgsCurve | None[source]¶
Returns the cross section profile curve, which represents the line along which the profile should be generated.
The coordinate reference system of the curve is retrieved via
crs().See also
- Return type:
Optional[QgsCurve]
- profileRequest(self) QgsProfileRequest[source]¶
Returns the profile request used to generate the elevation profile.
- Return type:
- setAtlasDriven(self, enabled: bool)[source]¶
Sets whether the profile curve will follow the current atlas feature.
This requires an active layout atlas or report, using a line geometry type coverage layer.
See also
- Parameters:
enabled (bool)
- setCrs(self, crs: QgsCoordinateReferenceSystem)[source]¶
Sets the desired Coordinate Reference System (
crs) for the profile.This also represents the CRS associated with the
profileCurve().See also
- Parameters:
- setDistanceUnit(self, unit: Qgis.DistanceUnit)[source]¶
Sets the
unitfor the distance axis.See also
Added in version 3.32.
- Parameters:
unit (Qgis.DistanceUnit)
- setLayers(self, layers: Iterable[QgsMapLayer])[source]¶
Sets the list of map
layersparticipating in the elevation profile.See also
- Parameters:
layers (Iterable[QgsMapLayer])
- setProfileCurve(self, curve: QgsCurve | None)[source]¶
Sets the cross section profile
curve, which represents the line along which the profile should be generated.Ownership of
curveis transferred to the item.The coordinate reference system of the
curveis set viasetCrs().See also
- Parameters:
curve (Optional[QgsCurve])
- setSources(self, sources: Iterable[QgsAbstractProfileSource])[source]¶
Sets the list of
sourcesparticipating in the elevation profile.See also
- Parameters:
sources (Iterable[QgsAbstractProfileSource])
- setSubsectionsSymbol(self, symbol: QgsLineSymbol | None)[source]¶
Sets the
symbolused to draw the subsections. IfsymbolisNone, the subsections are not drawn. Ownership ofsymbolis transferred.See also
Added in version 3.44.
- Parameters:
symbol (Optional[QgsLineSymbol])
- setTolerance(self, tolerance: float)[source]¶
Sets the tolerance of the request (in
crs()units).This value determines how far from the
profileCurve()is appropriate for inclusion of results. For instance, when a profile is generated for a point vector layer this tolerance distance will dictate how far from the actual profile curve a point can reside within to be included in the results. Other sources may completely ignore this tolerance if it is not appropriate for the particular source.See also
- Parameters:
tolerance (float)
- sources(self) List[QgsAbstractProfileSource]¶
Returns the list of sources participating in the elevation profile.
It includes both layer profile sources and custom sources from the profile source registry.
See also
- Return type:
List[QgsAbstractProfileSource]
- subsectionsSymbol(self) QgsLineSymbol | None[source]¶
Returns the symbol used to draw the subsections.
See also
Added in version 3.44.
- Return type:
Optional[QgsLineSymbol]
- tolerance(self) float[source]¶
Returns the tolerance of the request (in
crs()units).This value determines how far from the
profileCurve()is appropriate for inclusion of results. For instance, when a profile is generated for a point vector layer this tolerance distance will dictate how far from the actual profile curve a point can reside within to be included in the results. Other sources may completely ignore this tolerance if it is not appropriate for the particular source.See also
- Return type:
float