Class: QgsMapLayerElevationProperties

class qgis.core.QgsMapLayerElevationProperties(parent: QObject)

Bases: PyQt5.QtCore.QObject

Constructor for QgsMapLayerElevationProperties, with the specified parent object.

Base class for storage of map layer elevation properties.

QgsMapLayerElevationProperties exposes user-configurable settings for controlling how an individual QgsMapLayer behaves with relation to z values or elevations.

Methods

calculateZRange

Attempts to calculate the overall elevation or z range for the specified layer, using the settings defined by this elevation properties object.

childEvent

connectNotify

customEvent

disconnectNotify

flags

Returns flags associated to the elevation properties.

hasElevation

Returns True if the layer has an elevation or z component.

isSignalConnected

isVisibleInZRange

Returns True if the layer should be visible and rendered for the specified z range.

readXml

Reads the elevation properties from a DOM element previously written by writeXml().

receivers

sender

senderSignalIndex

timerEvent

writeXml

Writes the properties to a DOM element, to be used later with readXml().

Signals

changed

Emitted when the elevation properties have changed.

Attributes

FlagDontInvalidateCachedRendersWhenRangeChanges

class Flag

Bases: int

FlagDontInvalidateCachedRendersWhenRangeChanges = 1
class Flags
class Flags(Union[QgsMapLayerElevationProperties.Flags, QgsMapLayerElevationProperties.Flag])None
class Flags(QgsMapLayerElevationProperties.Flags)None

Bases: sip.wrapper

calculateZRange(self, layer: QgsMapLayer)QgsDoubleRange

Attempts to calculate the overall elevation or z range for the specified layer, using the settings defined by this elevation properties object.

May return an infinite range if the extent could not be calculated.

Parameters

layer (QgsMapLayer) –

Return type

QgsDoubleRange

changed

Emitted when the elevation properties have changed. [signal]

childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
disconnectNotify(self, QMetaMethod)
flags(self)QgsMapLayerElevationProperties.Flags

Returns flags associated to the elevation properties.

Return type

QgsMapLayerElevationProperties.Flags

hasElevation(self)bool

Returns True if the layer has an elevation or z component.

Return type

bool

isSignalConnected(self, QMetaMethod)bool
isVisibleInZRange(self, range: QgsDoubleRange)bool

Returns True if the layer should be visible and rendered for the specified z range.

Parameters

range (QgsDoubleRange) –

Return type

bool

readXml(self, element: QDomElement, context: QgsReadWriteContext)bool

Reads the elevation properties from a DOM element previously written by writeXml().

See also

writeXml()

Parameters
Return type

bool

receivers(self, PYQT_SIGNAL)int
sender(self)QObject
senderSignalIndex(self)int
timerEvent(self, QTimerEvent)
writeXml(self, element: QDomElement, doc: QDomDocument, context: QgsReadWriteContext)QDomElement

Writes the properties to a DOM element, to be used later with readXml().

See also

readXml()

Parameters
Return type

QDomElement