Class for storing a type independent a nodata value (nodata value can be deactivated as well) More...
#include "NoDataType.hpp"
Inheritance diagram for NoDataType:Public Types | |
| enum | Type { none = -1, value, min, max, nan, bitmask } |
Public Member Functions | |
| NoDataType (Type t) | |
| NoDataType (double v) | |
| bool | isEmpty () const |
| check if nodata value is deactivated | |
| void | setType (Type t) |
| set type independent nodata value or deactivate the nodata value | |
| void | setValue (double v) |
| set a specific nodata value | |
| Type | getType () const |
| returns the nodata value type | |
| double | getValue () const |
| return a specific nodata value (only relevant if type is Type::value) | |
| double | getValue (RasterDataType rasterType) const |
| returns the nodata value for the given raster type. If the value cannot be converted to the given raster type an exception is thrown. Reasons for exceptions: More... | |
| double | getValue (RasterDataType rasterType, bool &wasCropped) const |
| returns the nodata value for the given raster type but doesn't throw an exception if the value exceeds raster type limits (see above) | |
| void | setFromDouble (double v, RasterDataType rasterType) |
| set the nodata value for a given double value considering the raster type (useful when setting from GDAL nodata value). | |
Static Public Member Functions | |
CustomOptionType interface | |
| static const char * | help (bool) |
| static const char * | syntax () |
| static bool | exportsPythonType () |
Static Public Member Functions inherited from CustomOptionType< NoDataType > | |
| static const char * | _help (bool forDoxygen) |
| get general help on this type | |
| static const char * | _syntax () |
| get the syntax used for parsing this type | |
| static bool | _exportsPythonType () |
| returns true if this type is exposed to Python as a custom type, false otherwise (if it is represented as Python-string) | |
Protected Attributes | |
| Type | type_ |
| double | value_ |
Additional Inherited Members | |
Protected Member Functions inherited from CustomOptionType< NoDataType > | |
| ~CustomOptionType () | |
| protected, must be derived from | |
Class for storing a type independent a nodata value (nodata value can be deactivated as well)
| enum Type |
| double getValue | ( | RasterDataType | rasterType | ) | const |
returns the nodata value for the given raster type. If the value cannot be converted to the given raster type an exception is thrown. Reasons for exceptions: