Subgroup: other

Class: QgsHillshadeRenderer

class qgis.core.QgsHillshadeRenderer

Bases: qgis._core.QgsRasterRenderer

A renderer for generating live hillshade models.

New in version 2.16: Methods

alphaBand
altitude Returns the angle of the light source over the raster.
azimuth Returns the direction of the light over the raster between 0-360.
band Returns the band used by the renderer
bandCount
bandStatistics Get band statistics.
block
capabilities Returns a bitmask containing the supported capabilities
capabilitiesString Returns the above in friendly format.
clone
copyCommonProperties Copies common properties like opacity / transparency data from other renderer.
create Factory method to create a new renderer
cumulativeCut Find values for cumulative pixel count cut.
dataType
dataTypeSize
extent Get the extent of the interface.
generateBandName helper function to create zero padded band names
hasHistogram Returns true if histogram is available (cached, already calculated)
hasStatistics Returns true if histogram is available (cached, already calculated).
histogram Get histogram.
initHistogram
initStatistics
input Current input
legendSymbologyItems Get symbology items if provided by renderer
minMaxOrigin Returns const reference to origin of min/max values
multiDirectional Returns true if the renderer is using multi-directional hillshading.
on Is on/off
opacity Returns the opacity for the renderer, where opacity is a value between 0 (totally transparent) and 1.0 (fully opaque).
rasterTransparency
readXml Sets base class members from xml.
setAlphaBand
setAltitude Set the altitude of the light source
setAzimuth Set the azimuth of the light source.
setBand Sets the band used by the renderer.
setInput
setMinMaxOrigin Sets origin of min/max values
setMultiDirectional Sets whether to render using a multi-directional hillshade algorithm.
setOn Set on/off
setOpacity Sets the opacity for the renderer, where opacity is a value between 0 (totally transparent) and 1.0 (fully opaque).
setRasterTransparency
setZFactor Set the Z scaling factor of the result image.
sourceDataType Returns source data type for the band specified by number,
sourceInput Get source / raw input, the first in pipe, usually provider.
type
usesBands
usesTransparency
writeXml
xBlockSize Get block size
xSize Get raster size
yBlockSize
ySize
zFactor Returns the Z scaling factor.

Attributes

BuildPyramids
Create
Identify
IdentifyFeature
IdentifyHtml
IdentifyText
IdentifyValue
NODATA_COLOR
NoCapabilities
Remove
Size
altitude(self) → float

Returns the angle of the light source over the raster.

See also

setAltitude()

azimuth(self) → float

Returns the direction of the light over the raster between 0-360.

See also

setAzimuth()

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.

setAltitude(self, altitude: float)

Set the altitude of the light source

Parameters:altitude – the altitude

See also

altitude()

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

azimuth()

setBand(self, bandNo: int)

Sets the band used by the renderer.

See also

band()

setMultiDirectional(self, isMultiDirectional: bool)

Sets whether to render using a multi-directional hillshade algorithm.

Parameters:isMultiDirectional – set to true to use multi directional rendering
setZFactor(self, zfactor: float)

Set the Z scaling factor of the result image.

Parameters:zfactor – The z factor

See also

zFactor()

usesBands(self) → List[int]
writeXml(self, doc: QDomDocument, parentElem: QDomElement)
zFactor(self) → float

Returns the Z scaling factor.

See also

setZFactor()