Class: QgsRaster¶
- class qgis.core.QgsRaster¶
Bases:
sip.wrapper
Raster namespace.
Methods
Gets value representable by given data type.
Attributes
- 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¶
- PyramidsCopyExisting = 2¶
- PyramidsErdas = 2¶
- PyramidsFlagNo = 0¶
- PyramidsFlagYes = 1¶
- PyramidsGTiff = 0¶
- PyramidsInternal = 1¶
- class RasterBuildPyramids¶
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 ¶
Gets 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 (float) –
dataType (Qgis.DataType) –
New in version 2.1.
- Return type:
float