Subgroup: Raster

Class: QgsRaster

class qgis.core.QgsRaster

Bases: sip.wrapper

Raster namespace.

Methods

representableValue Get value representable by given data type.

Signals

Attributes

AlphaBand
BlackBand
BlueBand
ContinuousPalette
CyanBand
GrayIndex
GreenBand
HueBand
IdentifyFormatFeature
IdentifyFormatHtml
IdentifyFormatText
IdentifyFormatUndefined
IdentifyFormatValue
LightnessBand
MagentaBand
MultiBandColor
MultiBandSingleBandGray
MultiBandSingleBandPseudoColor
PaletteIndex
PalettedColor
PalettedMultiBandColor
PalettedSingleBandGray
PalettedSingleBandPseudoColor
ProgressHistogram
ProgressPyramids
ProgressStatistics
PyramidsCopyExisting
PyramidsErdas
PyramidsFlagNo
PyramidsFlagYes
PyramidsGTiff
PyramidsInternal
RedBand
SaturationBand
SingleBandColorDataStyle
SingleBandGray
SingleBandPseudoColor
UndefinedColorInterpretation
UndefinedDrawingStyle
YCbCr_CbBand
YCbCr_CrBand
YCbCr_YBand
YellowBand
AlphaBand = 6
BlackBand = 13
BlueBand = 5
class ColorInterpretation

Bases: int

ContinuousPalette = 17
CyanBand = 10
class DrawingStyle

Bases: int

GrayIndex = 1
GreenBand = 4
HueBand = 7
class IdentifyFormat

Bases: int

IdentifyFormatFeature = 8
IdentifyFormatHtml = 4
IdentifyFormatText = 2
IdentifyFormatUndefined = 0
IdentifyFormatValue = 1
LightnessBand = 9
MagentaBand = 11
MultiBandColor = 9
MultiBandSingleBandGray = 7
MultiBandSingleBandPseudoColor = 8
PaletteIndex = 2
PalettedColor = 3
PalettedMultiBandColor = 6
PalettedSingleBandGray = 4
PalettedSingleBandPseudoColor = 5
ProgressHistogram = 0
ProgressPyramids = 1
ProgressStatistics = 2
PyramidsCopyExisting = 2
PyramidsErdas = 2
PyramidsFlagNo = 0
PyramidsFlagYes = 1
PyramidsGTiff = 0
PyramidsInternal = 1
class RasterBuildPyramids

Bases: int

class RasterProgressType

Bases: int

class RasterPyramidsFormat

Bases: int

RedBand = 3
SaturationBand = 8
SingleBandColorDataStyle = 10
SingleBandGray = 1
SingleBandPseudoColor = 2
UndefinedColorInterpretation = 0
UndefinedDrawingStyle = 0
YCbCr_CbBand = 15
YCbCr_CrBand = 16
YCbCr_YBand = 14
YellowBand = 12
representableValue(value: float, dataType: Qgis.DataType) → float

Get value representable by given data type. Supported are numerical types Byte, UInt16, Int16, UInt32, Int32, Float32, Float64. This is done through C casting, so you have to be sure that the provided value is representable in the output data type. This can be checked with isRepresentableValue().

Parameters:
  • value
  • dataType

New in version 2.1.