Class: QgsRasterLayerSimpleLabeling¶
Basic implementation of the labeling interface for raster layers.
Added in version 3.42.
Class Hierarchy¶
Base classes¶
Abstract base class for labeling settings for raster layers. |
Methods
Returns the raster band to use for label values. |
|
Returns whether scale based visibility is enabled for the labels. |
|
Returns the maximum map scale (i.e. most "zoomed in" scale) at which the labels will be visible. |
|
Returns the minimum map scale (i.e. most "zoomed out" scale) at which the labels will be visible. |
|
Returns the numeric format used for the labels. |
|
Returns the label placement settings. |
|
Returns the priority of labels. |
|
Returns the resampling method used when the raster labels are being resampled over neighboring pixels. |
|
Returns the number of neighboring pixels to resample over, when labels are showing values resampled over neighboring pixels. |
|
Sest the raster band to use for label values. |
|
Sets the maximum map scale (i.e. most "zoomed in" scale) at which the labels will be visible. |
|
Sets the minimum map scale (i.e. most "zoomed out" scale) at which the labels will be visible. |
|
Sets the numeric format used for the labels. |
|
Sets the label placement settings. |
|
Sets the priority of labels. |
|
Sets the resampling method to use when the raster labels are being resampled over neighboring pixels. |
|
Sets the number of neighboring pixels to resample over, when labels are showing values resampled over neighboring pixels. |
|
Sets whether scale based visibility is enabled for the labels. |
|
Sets the text format used for rendering the labels. |
|
Sets the label thinning settings. |
|
Sets the Z-Index of the labels. |
|
Returns the text format used for rendering the labels. |
|
Returns the label thinning settings. |
|
Returns the Z-Index of the labels. |
Static Methods
Creates a |
- class qgis.core.QgsRasterLayerSimpleLabeling[source]¶
Bases:
QgsAbstractRasterLayerLabeling
- static create(element: QDomElement, context: QgsReadWriteContext) QgsRasterLayerSimpleLabeling | None [source]¶
Creates a
QgsRasterLayerSimpleLabeling
from a DOM element with saved configuration- Parameters:
element (QDomElement)
context (QgsReadWriteContext)
- Return type:
Optional[QgsRasterLayerSimpleLabeling]
- hasScaleBasedVisibility(self) bool [source]¶
Returns whether scale based visibility is enabled for the labels.
See also
See also
See also
- Return type:
bool
- maximumScale(self) float [source]¶
Returns the maximum map scale (i.e. most “zoomed in” scale) at which the labels will be visible.
The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. A scale of 0 indicates no maximum scale visibility.
This setting is only considered if
hasScaleBasedVisibility()
isTrue
.See also
See also
See also
- Return type:
float
- minimumScale(self) float [source]¶
Returns the minimum map scale (i.e. most “zoomed out” scale) at which the labels will be visible.
The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. A scale of 0 indicates no minimum scale visibility.
This setting is only considered if
hasScaleBasedVisibility()
isTrue
.See also
See also
See also
- Return type:
float
- numericFormat(self) QgsNumericFormat | None [source]¶
Returns the numeric format used for the labels.
See also
- Return type:
Optional[QgsNumericFormat]
- placementSettings(self) QgsLabelPlacementSettings ¶
Returns the label placement settings.
See also
- Return type:
- priority(self) float [source]¶
Returns the priority of labels.
This is a value between 0 to 1, where 0 = highest priority and 1 = lowest priority.
The default is 0.5.
See also
- Return type:
float
- resampleMethod(self) Qgis.RasterResamplingMethod [source]¶
Returns the resampling method used when the raster labels are being resampled over neighboring pixels.
See also
See also
- Return type:
- resampleOver(self) int [source]¶
Returns the number of neighboring pixels to resample over, when labels are showing values resampled over neighboring pixels.
See also
See also
- Return type:
int
- setBand(self, band: int)[source]¶
Sest the raster
band
to use for label values.See also
- Parameters:
band (int)
- setMaximumScale(self, scale: float)[source]¶
Sets the maximum map
scale
(i.e. most “zoomed in” scale) at which the labels will be visible.The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. A scale of 0 indicates no maximum scale visibility.
This setting is only considered if
hasScaleBasedVisibility()
isTrue
.See also
See also
See also
- Parameters:
scale (float)
- setMinimumScale(self, scale: float)[source]¶
Sets the minimum map
scale
(i.e. most “zoomed out” scale) at which the labels will be visible.The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. A scale of 0 indicates no minimum scale visibility.
This setting is only considered if
hasScaleBasedVisibility()
isTrue
.See also
See also
See also
- Parameters:
scale (float)
- setNumericFormat(self, format: QgsNumericFormat | None)[source]¶
Sets the numeric
format
used for the labels.Ownership of
format
is transferred to the labeling.See also
- Parameters:
format (Optional[QgsNumericFormat])
- setPlacementSettings(self, settings: QgsLabelPlacementSettings)[source]¶
Sets the label placement
settings
.See also
- Parameters:
settings (QgsLabelPlacementSettings)
- setPriority(self, priority: float)[source]¶
Sets the
priority
of labels.This is a value between 0 to 1, where 0 = highest priority and 1 = lowest priority.
See also
- Parameters:
priority (float)
- setResampleMethod(self, method: Qgis.RasterResamplingMethod)[source]¶
Sets the resampling
method
to use when the raster labels are being resampled over neighboring pixels.See also
See also
- Parameters:
method (Qgis.RasterResamplingMethod)
- setResampleOver(self, pixels: int)[source]¶
Sets the number of neighboring
pixels
to resample over, when labels are showing values resampled over neighboring pixels.See also
See also
- Parameters:
pixels (int)
- setScaleBasedVisibility(self, enabled: bool)[source]¶
Sets whether scale based visibility is enabled for the labels.
See also
See also
See also
- Parameters:
enabled (bool)
- setTextFormat(self, format: QgsTextFormat)[source]¶
Sets the text
format
used for rendering the labels.See also
- Parameters:
format (QgsTextFormat)
- setThinningSettings(self, settings: QgsLabelThinningSettings)[source]¶
Sets the label thinning
settings
.See also
- Parameters:
settings (QgsLabelThinningSettings)
- setZIndex(self, index: float)[source]¶
Sets the Z-Index of the labels.
Labels with a higher z-index are rendered on top of labels with a lower z-index.
See also
- Parameters:
index (float)
- textFormat(self) QgsTextFormat [source]¶
Returns the text format used for rendering the labels.
See also
- Return type:
- thinningSettings(self) QgsLabelThinningSettings ¶
Returns the label thinning settings.
See also
- Return type: