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. |
- 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:
- 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]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- 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:
- 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