Subgroup: Single

Class: QgsSingleBandPseudoColorRenderer

class qgis.core.QgsSingleBandPseudoColorRenderer

Bases: qgis._core.QgsRasterRenderer

Raster renderer pipe for single band pseudocolor.

Methods

alphaBand
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.
classificationMax
classificationMin
clone QgsSingleBandPseudoColorRenderer cannot be copied.
constShader
copyCommonProperties Copies common properties like opacity / transparency data from other renderer.
create
createShader Creates a color ramp shader
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
minMaxOrigin Returns const reference to origin of min/max values
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
setBand Sets the band used by the renderer.
setClassificationMax
setClassificationMin
setInput
setMinMaxOrigin Sets origin of min/max values
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
setShader Takes ownership of the shader
shader Returns the raster shader
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

Attributes

BuildPyramids
Create
Identify
IdentifyFeature
IdentifyHtml
IdentifyText
IdentifyValue
NODATA_COLOR
NoCapabilities
Remove
Size
band(self) → int

Returns the band used by the renderer

New in version 2.7.

block(self, bandNo: int, extent: QgsRectangle, width: int, height: int, feedback: QgsRasterBlockFeedback = None) → QgsRasterBlock
classificationMax(self) → float
classificationMin(self) → float
clone(self) → QgsSingleBandPseudoColorRenderer

QgsSingleBandPseudoColorRenderer cannot be copied. Use clone() instead.

constShader(self) → QgsRasterShader

Note

available in Python as constShader

create(elem: QDomElement, input: QgsRasterInterface) → QgsRasterRenderer
createShader(self, colorRamp: QgsColorRamp = None, colorRampType: QgsColorRampShader.Type = QgsColorRampShader.Interpolated, classificationMode: QgsColorRampShader.ClassificationMode = QgsColorRampShader.Continuous, classes: int = 0, clip: bool = False, extent: QgsRectangle = QgsRectangle())

Creates a color ramp shader

Parameters:
  • colorRamp – vector color ramp
  • colorRampType – type of color ramp shader
  • classificationMode – classification mode
  • classes – number of classes
  • clip – clip out of range values
  • extent – extent used in classification (only used in quantile mode)
initHistogram()
initStatistics()
legendSymbologyItems(self) → List[Tuple[str, QColor]]
setBand(self, bandNo: int)

Sets the band used by the renderer.

See also

band()

New in version 2.10.

setClassificationMax(self, max: float)
setClassificationMin(self, min: float)
setShader(self, shader: QgsRasterShader)

Takes ownership of the shader

shader(self) → QgsRasterShader

Returns the raster shader

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