Class: QgsHillshadeRenderer¶
-
class
qgis.core.
QgsHillshadeRenderer
(input: QgsRasterInterface, band: int, lightAzimuth: float, lightAltitude: float)¶ Bases:
qgis._core.QgsRasterRenderer
A renderer for generating live hillshade models.
- Parameters
input – The input raster interface
band – The band in the raster to use
lightAzimuth – The azimuth of the light source
lightAltitude – The altitude of the light source
A renderer for generating live hillshade models.
New in version 2.16: Enums
Methods
Returns the angle of the light source over the raster.
Returns the direction of the light over the raster between 0-360.
Returns the band used by the renderer
Factory method to create a new renderer
Returns
True
if the renderer is using multi-directional hillshading.Set the altitude of the light source
Set the azimuth of the light source.
Sets the band used by the renderer.
Sets whether to render using a multi-directional hillshade algorithm.
Set the Z scaling factor of the result image.
Returns the Z scaling factor.
Signals
Attributes
-
altitude
(self) → float¶ Returns the angle of the light source over the raster.
See also
-
azimuth
(self) → float¶ Returns the direction of the light over the raster between 0-360.
See also
-
band
(self) → int¶ Returns the band used by the renderer
-
block
(self, bandNo: int, extent: QgsRectangle, width: int, height: int, feedback: QgsRasterBlockFeedback = None) → QgsRasterBlock¶
-
clone
(self) → QgsHillshadeRenderer¶
-
create
(elem: QDomElement, input: QgsRasterInterface) → QgsRasterRenderer¶ Factory method to create a new renderer
- Parameters
elem – A DOM element to create the renderer from.
input – The raster input interface.
- Returns
A new QgsHillshadeRenderer.
-
initHistogram
()¶
-
initStatistics
()¶
-
multiDirectional
(self) → bool¶ Returns
True
if the renderer is using multi-directional hillshading.See also
-
setAltitude
(self, altitude: float)¶ Set the altitude of the light source
- Parameters
altitude – the altitude
See also
-
setAzimuth
(self, azimuth: float)¶ Set the azimuth of the light source.
- Parameters
azimuth – The azimuth of the light source, between 0 and 360.0
See also
-
setMultiDirectional
(self, isMultiDirectional: bool)¶ Sets whether to render using a multi-directional hillshade algorithm.
- Parameters
isMultiDirectional – set to
True
to use multi directional rendering
See also
-
setZFactor
(self, zfactor: float)¶ Set the Z scaling factor of the result image.
- Parameters
zfactor – The z factor
See also
-
toSld
(self, doc: QDomDocument, element: QDomElement, props: Dict[str, str] = {})¶
-
usesBands
(self) → List[int]¶
-
writeXml
(self, doc: QDomDocument, parentElem: QDomElement)¶
-
zFactor
(self) → float¶ Returns the Z scaling factor.
See also