Class: QgsMapLayerElevationProperties

class qgis.core.QgsMapLayerElevationProperties

Bases: PyQt5.QtCore.QObject

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.

New in version 3.18.

QgsMapLayerElevationProperties(parent: QObject) Constructor for QgsMapLayerElevationProperties, with the specified parent object.

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

pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

Attributes

FlagDontInvalidateCachedRendersWhenRangeChanges

class Flag

Bases: int

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

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

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.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_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