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 individualQgsMapLayer
behaves with relation to z values or elevations.New in version 3.18.
QgsMapLayerElevationProperties(parent: QObject) Constructor for
QgsMapLayerElevationProperties
, with the specifiedparent
object.Methods
Attempts to calculate the overall elevation or z range for the specified
layer
, using the settings defined by this elevation properties object.Creates a clone of the properties.
Copies common properties from another object.
Returns a reference to the object's property collection, used for data defined overrides.
Returns flags associated to the elevation properties.
Returns
True
if the layer has an elevation or z component.Returns a HTML formatted summary of the properties.
Returns
True
if the layer should be visible and rendered for the specified zrange
.Returns the definitions for data defined properties available for use in elevation properties.
Reads common class properties from a DOM
element
previously written bywriteXml()
.Reads the elevation properties from a DOM
element
previously written bywriteXml()
.Sets the object's property
collection
, used for data defined overrides.Sets default properties based on sensible choices for the given map
layer
.Sets the z
offset
, which is a fixed offset amount which will be added to z values from the layer.Sets the z
scale
, which is a scaling factor which will be applied to z values from the layer.Returns
True
if the layer should be visible by default in newly created elevation profile plots.Writes common class properties to a DOM
element
, to be used later withreadXml()
.Writes the properties to a DOM
element
, to be used later withreadXml()
.Returns the z offset, which is a fixed offset amount which should be added to z values from the layer.
Returns the z scale, which is a scaling factor which should be applied to z values from the layer.
Signals
Emitted when any of the elevation properties have changed.
Emitted when any of the elevation properties which relate solely to generation of elevation profiles have changed.
Emitted when any of the elevation properties which relate solely to presentation of elevation results have changed.
Emitted when the z offset changes.
Emitted when the z scale changes.
Attributes
- ExtrusionHeight = 1¶
- class Flag¶
Bases:
int
- FlagDontInvalidateCachedRendersWhenRangeChanges = 1¶
- class Flags¶
- class Flags(Union[QgsMapLayerElevationProperties.Flags, QgsMapLayerElevationProperties.Flag])
- class Flags(QgsMapLayerElevationProperties.Flags)
Bases:
sip.wrapper
- class Property¶
Bases:
int
- ZOffset = 0¶
- 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 any of the elevation properties have changed.
See
renderingPropertyChanged()
andprofileGenerationPropertyChanged()
for more fine-grained signals. [signal]
- childEvent(self, QChildEvent)¶
- clone(self) QgsMapLayerElevationProperties ¶
Creates a clone of the properties.
New in version 3.26.
- Return type
- connectNotify(self, QMetaMethod)¶
- copyCommonProperties(self, other: QgsMapLayerElevationProperties)¶
Copies common properties from another object.
New in version 3.26.
- Parameters
other (QgsMapLayerElevationProperties) –
- customEvent(self, QEvent)¶
- dataDefinedProperties(self) QgsPropertyCollection ¶
Returns a reference to the object’s property collection, used for data defined overrides.
See also
New in version 3.26.
- Return type
- 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
- htmlSummary(self) str ¶
Returns a HTML formatted summary of the properties.
New in version 3.26.
- Return type
str
- 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
- profileGenerationPropertyChanged¶
Emitted when any of the elevation properties which relate solely to generation of elevation profiles have changed.
See also
See also
New in version 3.26: [signal]
- profileRenderingPropertyChanged¶
Emitted when any of the elevation properties which relate solely to presentation of elevation results have changed.
See also
See also
New in version 3.26: [signal]
- propertyDefinitions() Dict[int, QgsPropertyDefinition] ¶
Returns the definitions for data defined properties available for use in elevation properties.
New in version 3.26.
- Return type
Dict[int, QgsPropertyDefinition]
- readCommonProperties(self, element: QDomElement, context: QgsReadWriteContext)¶
Reads common class properties from a DOM
element
previously written bywriteXml()
.See also
New in version 3.26.
- Parameters
element (QDomElement) –
context (QgsReadWriteContext) –
- 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 ¶
- setDataDefinedProperties(self, collection: QgsPropertyCollection)¶
Sets the object’s property
collection
, used for data defined overrides.Any existing properties will be discarded.
See also
See also
Property
New in version 3.26.
- Parameters
collection (QgsPropertyCollection) –
- setDefaultsFromLayer(self, layer: QgsMapLayer)¶
Sets default properties based on sensible choices for the given map
layer
.New in version 3.26.
- Parameters
layer (QgsMapLayer) –
- setZOffset(self, offset: float)¶
Sets the z
offset
, which is a fixed offset amount which will be added to z values from the layer.See also
- Parameters
offset (float) –
- setZScale(self, scale: float)¶
Sets the z
scale
, which is a scaling factor which will be applied to z values from the layer.This can be used to correct or manually adjust for incorrect elevation values in a layer, such as conversion of elevation values in feet to meters.
See also
- Parameters
scale (float) –
- showByDefaultInElevationProfilePlots(self) bool ¶
Returns
True
if the layer should be visible by default in newly created elevation profile plots.Subclasses should override this with logic which determines whether the layer is likely desirable to be initially checked in these plots.
New in version 3.26.
- Return type
bool
- timerEvent(self, QTimerEvent)¶
- writeCommonProperties(self, element: QDomElement, doc: QDomDocument, context: QgsReadWriteContext)¶
Writes common class properties to a DOM
element
, to be used later withreadXml()
.See also
New in version 3.26.
- Parameters
element (QDomElement) –
doc (QDomDocument) –
context (QgsReadWriteContext) –
- 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
- zOffset(self) float ¶
Returns the z offset, which is a fixed offset amount which should be added to z values from the layer.
See also
- Return type
float
- zOffsetChanged¶
Emitted when the z offset changes.
New in version 3.26: [signal]
- zScale(self) float ¶
Returns the z scale, which is a scaling factor which should be applied to z values from the layer.
This can be used to correct or manually adjust for incorrect elevation values in a layer, such as conversion of elevation values in feet to meters.
See also
- Return type
float
- zScaleChanged¶
Emitted when the z scale changes.
New in version 3.26: [signal]