Class: QgsProjectElevationProperties

Contains elevation properties for a QgsProject.

Added in version 3.26.

Class Hierarchy

Inheritance diagram of qgis.core.QgsProjectElevationProperties

Base classes

QObject

Methods

elevationFilterRangeSize

Returns the fixed size for elevation range filtering in the project, used when interactively filtering by elevation.

elevationRange

Returns the project's elevation range, which indicates the upper and lower elevation limits associated with the project.

invertElevationFilter

Returns True if the elevation range filter slider should be inverted for this project.

readXml

Reads the property state from a DOM element.

reset

Resets the properties to a default state.

resolveReferences

Resolves reference to layers from stored layer ID.

setElevationFilterRangeSize

Sets the fixed size for elevation range filtering in the project, used when interactively filtering by elevation.

setElevationRange

Sets the project's elevation range, which indicates the upper and lower elevation limits associated with the project.

setInvertElevationFilter

Sets whether the elevation range filter slider should be inverted for this project.

setTerrainProvider

Sets the project's terrain provider.

terrainProvider

Returns the project's terrain provider.

writeXml

Returns a DOM element representing the properties.

Signals

changed

Emitted when the elevation properties change.

elevationRangeChanged

Emitted when the project's elevation is changed.

class qgis.core.QgsProjectElevationProperties[source]

Bases: QObject

__init__(parent: QObject | None = None)

Constructor for QgsProjectElevationProperties with the specified parent object.

Parameters:

parent (Optional[QObject] = None)

signal changed[source]

Emitted when the elevation properties change.

elevationFilterRangeSize(self) float[source]

Returns the fixed size for elevation range filtering in the project, used when interactively filtering by elevation.

Returns -1 if no fixed elevation range size is desired.

A fixed size forces the selected elevation range to have a matching difference between the upper and lower elevation.

Added in version 3.38.

Return type:

float

elevationRange(self) QgsDoubleRange[source]

Returns the project’s elevation range, which indicates the upper and lower elevation limits associated with the project.

Note

This is a manual, use-set property, and does not necessarily coincide with the elevation ranges for individual layers in the project.

Added in version 3.38.

Return type:

QgsDoubleRange

signal elevationRangeChanged(range: QgsDoubleRange)[source]

Emitted when the project’s elevation is changed.

Note

This is a manual, use-set property, and does not necessarily coincide with the elevation ranges for individual layers in the project.

See also

elevationRange()

Added in version 3.38.

Parameters:

range (QgsDoubleRange)

invertElevationFilter(self) bool[source]

Returns True if the elevation range filter slider should be inverted for this project.

Added in version 3.38.

Return type:

bool

readXml(self, element: QDomElement, context: QgsReadWriteContext) bool[source]

Reads the property state from a DOM element.

See also

writeXml()

Parameters:
Return type:

bool

reset(self)[source]

Resets the properties to a default state.

resolveReferences(self, project: QgsProject | None)[source]

Resolves reference to layers from stored layer ID.

Parameters:

project (Optional[QgsProject])

setElevationFilterRangeSize(self, size: float)[source]

Sets the fixed size for elevation range filtering in the project, used when interactively filtering by elevation.

Set to -1 if no fixed elevation range size is desired.

A fixed size forces the selected elevation range to have a matching difference between the upper and lower elevation.

Added in version 3.38.

Parameters:

size (float)

setElevationRange(self, range: QgsDoubleRange)[source]

Sets the project’s elevation range, which indicates the upper and lower elevation limits associated with the project.

Note

This is a manual, use-set property, and does not necessarily coincide with the elevation ranges for individual layers in the project.

See also

elevationRange()

Added in version 3.38.

Parameters:

range (QgsDoubleRange)

setInvertElevationFilter(self, invert: bool)[source]

Sets whether the elevation range filter slider should be inverted for this project.

Added in version 3.38.

Parameters:

invert (bool)

setTerrainProvider(self, provider: QgsAbstractTerrainProvider | None)[source]

Sets the project’s terrain provider.

Ownership of provider is transferred to this object.

Parameters:

provider (Optional[QgsAbstractTerrainProvider])

terrainProvider(self) QgsAbstractTerrainProvider | None[source]

Returns the project’s terrain provider.

Return type:

Optional[QgsAbstractTerrainProvider]

writeXml(self, document: QDomDocument, context: QgsReadWriteContext) QDomElement[source]

Returns a DOM element representing the properties.

See also

readXml()

Parameters:
Return type:

QDomElement