Class: QgsMapLayerElevationProperties¶
- class qgis.core.QgsMapLayerElevationProperties(parent: QObject)¶
Bases:
PyQt5.QtCore.QObject
Constructor for
QgsMapLayerElevationProperties
, with the specifiedparent
object.Base class for storage of map layer elevation properties.
QgsMapLayerElevationProperties
exposes user-configurable settings for controlling how an individualQgsMapLayer
behaves with relation to z values or elevations.Methods
Attempts to calculate the overall elevation or z range for the specified
layer
, using the settings defined by this elevation properties object.Returns flags associated to the elevation properties.
Returns
True
if the layer has an elevation or z component.Returns
True
if the layer should be visible and rendered for the specified zrange
.Reads the elevation properties from a DOM
element
previously written bywriteXml()
.Writes the properties to a DOM
element
, to be used later withreadXml()
.Signals
Emitted when the elevation properties have changed.
Attributes
- 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
- 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
- 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 zrange
.- Parameters
range (QgsDoubleRange) –
- Return type
bool
- readXml(self, element: QDomElement, context: QgsReadWriteContext) → bool¶
Reads the elevation properties from a DOM
element
previously written bywriteXml()
.See also
- Parameters
element (QDomElement) –
context (QgsReadWriteContext) –
- 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 withreadXml()
.See also
- Parameters
element (QDomElement) –
doc (QDomDocument) –
context (QgsReadWriteContext) –
- Return type
QDomElement