QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
Static Public Member Functions | List of all members
QgsRaster Class Reference

Raster namespace. More...

#include <qgsraster.h>

Static Public Member Functions

static bool isRepresentableValue (double value, Qgis::DataType dataType)
 Check if the specified value is representable in the given data type. More...
 
static double representableValue (double value, Qgis::DataType dataType)
 Gets value representable by given data type. More...
 

Detailed Description

Raster namespace.

Definition at line 31 of file qgsraster.h.

Member Function Documentation

◆ isRepresentableValue()

bool QgsRaster::isRepresentableValue ( double  value,
Qgis::DataType  dataType 
)
static

Check if the specified value is representable in the given data type.

Supported are numerical types Byte, Int8, UInt16, Int16, UInt32, Int32, Float32, Float64.

Parameters
value
dataType
Note
not available in Python bindings
Since
QGIS 2.16

Definition at line 22 of file qgsraster.cpp.

◆ representableValue()

double QgsRaster::representableValue ( double  value,
Qgis::DataType  dataType 
)
static

Gets value representable by given data type.

Supported are numerical types Byte, Int8, 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
Since
QGIS 2.1

Definition at line 55 of file qgsraster.cpp.


The documentation for this class was generated from the following files: