|
| GeoBitmap (int width, int height, int type, std::shared_ptr< RasterProjector > rasterProjector=nullptr) |
|
std::shared_ptr< RasterProjector > | rasterProjector () const |
|
void | setRasterProjector (const std::shared_ptr< RasterProjector > &rasterProjector) |
|
bool | isElevation () const |
|
bool | isFloat () const |
|
bool | isColorImage () const |
|
bool | isCompressed () const |
|
bool | isVector () const |
|
bool | isUnsigned () const |
|
bool | hasAlpha () const |
|
bool | isEmpty () const |
|
int | width () const |
|
int | height () const |
|
int | type () const |
|
double | nodata () const |
|
double | fill () const |
|
int | numPixels () const |
|
int | getIndex (int x, int y) const |
|
double | scale () const |
|
double | offset () const |
|
void | setOffset (double offset) |
|
void | setScale (double scale) |
|
int | pixelSize () const |
| Pixel size in bytes. Not valid for compressed image formats!
|
|
int | size () const |
|
void | initialize (int width, int height, int type) |
|
int | getInt (int idx) const |
|
int | getInt (int x, int y) const |
|
float | getFloat (int idx) const |
|
float | getFloat (int x, int y) const |
| Override, see above.
|
|
uint32_t | getUInt (int idx) const |
|
uint32_t | getUInt (int x, int y) const |
| Override, see above.
|
|
void | setInt (int x, int y, int value) |
|
void | setNodata (double nodata) |
|
void | setFill (double fill) |
|
bool | isNodataValue (double val) const |
| Return true if the given value is a nodata or fill value.
|
|
bool | isNodataImage () const |
| Returns true if tile contains only nodata or fill values.
|
|
double | getElevationValue (int idx) const |
|
double | getElevationValue (int x, int y) const |
|
void | setElevationValue (int idx, double value) |
|
void | setElevationValue (int x, int y, double value) |
|
void | setInt (int idx, int value) |
|
void | setFloat (int idx, float value) |
|
void | setUInt (int idx, uint32_t value) |
|
void | setUInt (int x, int y, uint32_t value) |
|
void | setFloat (int x, int y, float value) |
|
void | setColorRGBA (int idx, unsigned char r, unsigned char g, unsigned char b, unsigned char a=255) |
|
void | setColorRGBA (int x, int y, unsigned char r, unsigned char g, unsigned char b, unsigned char a=255) |
|
void | getColorRGBA (int idx, unsigned char &r, unsigned char &g, unsigned char &b, unsigned char &a) const |
|
void | getColorRGBA (int x, int y, unsigned char &r, unsigned char &g, unsigned char &b, unsigned char &a) const |
|
void | fill (unsigned char val) |
|
const std::vector< unsigned char > & | buffer () const |
|
unsigned char * | data () |
|
const unsigned char * | constData () const |
|
void | setData (const std::vector< unsigned char > &data) |
|
void | calcMinMaxElevation (double &min, double &max) const |
|
bool | decompress (GeoBitmap &dst) const |
|
GeoBitmap - Georeferenced imagery or elevation data. Georeferenced bitmap data. This class contains a buffer of image data and optionally a georeference (RasterProjetor).
This class is mainly intended to be used for compact storage representations of geodata. For high perforamance pixel operations, you should first unpack the geobitmap to a more special purpose class.
The image data may be stored in compressed form (JPEG, PNG, DXTC, Gzip) in which case the pixel access methods (setInt(), setColorRGBA(), getInt(), etc) will not work. This class can optionally use an internal scale factor and offset for compact representation of elevation data. The relationship between the actual elevation value and the internal packed value is given by:
orig_h = packed_h*scale + offset
This class can also have a special value for nodata, representing holes in the dataset. This value is stored with no scaling or offset, so make sure the data format has enough precision to represent the chosen nodata value.