Class: QgsRasterContourRenderer¶
Raster renderer that generates contours on the fly for a source raster band.
Added in version 3.14.
Class Hierarchy¶
Base classes¶
Raster renderer pipe that applies colors to a raster. |
|
Base class for processing filters like renderers, reprojector, resampler etc. |
Methods
Returns the interval of index contour lines (index contour lines are typical further apart and with a wider line symbol) |
|
Returns the symbol of index contour lines |
|
Returns the interval of contour lines generation |
|
Returns the symbol used for contour lines |
|
Returns by how much the renderer will scale down the request to the data provider. |
|
Sets the interval of index contour lines (index contour lines are typical further apart and with a wider line symbol) |
|
Sets the symbol of index contour lines |
|
Sets the interval of contour lines generation |
|
Sets the symbol used for contour lines. |
|
Sets by how much the renderer will scale down the request to the data provider. |
Static Methods
Creates an instance of the renderer based on definition from XML (used by renderer registry) |
- class qgis.core.QgsRasterContourRenderer[source]¶
Bases:
QgsRasterRenderer
- __init__(input: QgsRasterInterface | None)
Creates a contour renderer
- Parameters:
input (Optional[QgsRasterInterface])
- contourIndexInterval(self) float [source]¶
Returns the interval of index contour lines (index contour lines are typical further apart and with a wider line symbol)
- Return type:
float
- contourIndexSymbol(self) QgsLineSymbol | None [source]¶
Returns the symbol of index contour lines
- Return type:
Optional[QgsLineSymbol]
- contourInterval(self) float [source]¶
Returns the interval of contour lines generation
- Return type:
float
- contourSymbol(self) QgsLineSymbol | None [source]¶
Returns the symbol used for contour lines
- Return type:
Optional[QgsLineSymbol]
- static create(elem: QDomElement, input: QgsRasterInterface | None) QgsRasterRenderer | None [source]¶
Creates an instance of the renderer based on definition from XML (used by renderer registry)
- Parameters:
elem (QDomElement)
input (Optional[QgsRasterInterface])
- Return type:
Optional[QgsRasterRenderer]
- downscale(self) float [source]¶
Returns by how much the renderer will scale down the request to the data provider. For example, for a raster block 1000x500 with downscale 10, the renderer will request raster 100x50 from provider. Higher downscale makes contour lines more simplified (at the expense of losing some detail). The value of one means there will be no downscaling.
- Return type:
float
- setContourIndexInterval(self, interval: float)[source]¶
Sets the interval of index contour lines (index contour lines are typical further apart and with a wider line symbol)
- Parameters:
interval (float)
- setContourIndexSymbol(self, symbol: QgsLineSymbol | None)[source]¶
Sets the symbol of index contour lines
- Parameters:
symbol (Optional[QgsLineSymbol])
- setContourInterval(self, interval: float)[source]¶
Sets the interval of contour lines generation
- Parameters:
interval (float)
- setContourSymbol(self, symbol: QgsLineSymbol | None)[source]¶
Sets the symbol used for contour lines. Takes ownership of the passed symbol
- Parameters:
symbol (Optional[QgsLineSymbol])