![]() |
Agroeye
1.0
|
Class encapsulating Raster file object. More...
#include <Raster.h>
Public Member Functions | |
Raster (const Raster &other) | |
Raster (Raster &&other) | |
Raster & | operator= (const Raster &other) |
Raster & | operator= (Raster &&other) |
virtual | ~Raster () |
Raster (const char *path) | |
Opens file. More... | |
Raster (const char *path, agroeye::general::CallbackFunction func) | |
Opens file. More... | |
size_t | getBandsCount () const |
size_t | getWidth () const |
size_t | getHeight () const |
RasterDataGroup | read (size_t x, size_t y, size_t width, size_t height) |
Reads pixels data from all bands inside raster. More... | |
RasterBand | getBand (const size_t bandNo) |
Gets the band of raster. More... | |
std::string | getPath () const |
std::string | getProj4 () const |
std::unique_ptr< double[]> | getGeoTransform () const |
Static Public Member Functions | |
static Raster | copy (const Raster &other, const char *path) |
Copies the raster. More... | |
static Raster | emptyCopy (const Raster &other, const char *path) |
Copies and empties raster. More... | |
Class encapsulating Raster file object.
When new instances of this class are created using copy operators they are still sharing pointer to the same object. Not thread safe (yet).
agroeye::handlers::Raster::Raster | ( | const Raster & | other | ) |
Copy constructor
agroeye::handlers::Raster::Raster | ( | Raster && | other | ) |
Move constructor
|
virtual |
Destructor deallocating resources
agroeye::handlers::Raster::Raster | ( | const char * | path | ) |
Opens file.
Opens file with given filepath. The silence callback is used to silence all feedback.
path | Path to the file |
agroeye::handlers::Raster::Raster | ( | const char * | path, |
agroeye::general::CallbackFunction | func | ||
) |
Opens file.
Opens file with given filepath. The given function is used to feedback.
path | Path to the file |
func | Callback function |
Copies the raster.
The given raster is used to create to exact copy
other | Raster to be copy |
path | Output location |
Copies and empties raster.
The given raster is used to create an empty copy
other | Raster to be copy |
path | Output location |
RasterBand agroeye::handlers::Raster::getBand | ( | const size_t | bandNo | ) |
Gets the band of raster.
bandNo | Number of band |
size_t agroeye::handlers::Raster::getBandsCount | ( | ) | const |
Number of bands that raster is consited of
std::unique_ptr< double[]> agroeye::handlers::Raster::getGeoTransform | ( | ) | const |
Gets the parameters of spatial location of raster
size_t agroeye::handlers::Raster::getHeight | ( | ) | const |
Height of the raster
|
inline |
std::string agroeye::handlers::Raster::getProj4 | ( | ) | const |
Path to the location of raster Gets the geografic definition of raster in Proj4 format
size_t agroeye::handlers::Raster::getWidth | ( | ) | const |
Width of the raster
Move assignment
RasterDataGroup agroeye::handlers::Raster::read | ( | size_t | x, |
size_t | y, | ||
size_t | width, | ||
size_t | height | ||
) |
Reads pixels data from all bands inside raster.
x | Column number of top left corner |
y | Row number of top left corner |
width | Width of reading fragment |
height | Height of reading fragment |