Agroeye  1.0
Public Member Functions | Static Public Member Functions | List of all members
agroeye::handlers::Raster Class Reference

Class encapsulating Raster file object. More...

#include <Raster.h>

Collaboration diagram for agroeye::handlers::Raster:

Public Member Functions

 Raster (const Raster &other)
 
 Raster (Raster &&other)
 
Rasteroperator= (const Raster &other)
 
Rasteroperator= (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...
 

Detailed Description

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).

Constructor & Destructor Documentation

§ Raster() [1/4]

agroeye::handlers::Raster::Raster ( const Raster other)

Copy constructor

Here is the caller graph for this function:

§ Raster() [2/4]

agroeye::handlers::Raster::Raster ( Raster &&  other)

Move constructor

Here is the call graph for this function:

§ ~Raster()

agroeye::handlers::Raster::~Raster ( )
virtual

Destructor deallocating resources

§ Raster() [3/4]

agroeye::handlers::Raster::Raster ( const char *  path)

Opens file.

Opens file with given filepath. The silence callback is used to silence all feedback.

Parameters
pathPath to the file
Here is the call graph for this function:

§ Raster() [4/4]

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.

Parameters
pathPath to the file
funcCallback function

Member Function Documentation

§ copy()

Raster agroeye::handlers::Raster::copy ( const Raster other,
const char *  path 
)
static

Copies the raster.

The given raster is used to create to exact copy

Parameters
otherRaster to be copy
pathOutput location
Returns
Newly created raster
Here is the call graph for this function:

§ emptyCopy()

Raster agroeye::handlers::Raster::emptyCopy ( const Raster other,
const char *  path 
)
static

Copies and empties raster.

The given raster is used to create an empty copy

Parameters
otherRaster to be copy
pathOutput location
Returns
Newly created raster
Here is the call graph for this function:

§ getBand()

RasterBand agroeye::handlers::Raster::getBand ( const size_t  bandNo)

Gets the band of raster.

Parameters
bandNoNumber of band
Returns
Raster Band object
Here is the caller graph for this function:

§ getBandsCount()

size_t agroeye::handlers::Raster::getBandsCount ( ) const

Number of bands that raster is consited of

§ getGeoTransform()

std::unique_ptr< double[]> agroeye::handlers::Raster::getGeoTransform ( ) const

Gets the parameters of spatial location of raster

Here is the caller graph for this function:

§ getHeight()

size_t agroeye::handlers::Raster::getHeight ( ) const

Height of the raster

Here is the caller graph for this function:

§ getPath()

std::string agroeye::handlers::Raster::getPath ( ) const
inline
Here is the call graph for this function:

§ getProj4()

std::string agroeye::handlers::Raster::getProj4 ( ) const

Path to the location of raster Gets the geografic definition of raster in Proj4 format

Here is the caller graph for this function:

§ getWidth()

size_t agroeye::handlers::Raster::getWidth ( ) const

Width of the raster

Here is the caller graph for this function:

§ operator=() [1/2]

Raster & agroeye::handlers::Raster::operator= ( const Raster other)

Copy assignment

§ operator=() [2/2]

Raster & agroeye::handlers::Raster::operator= ( Raster &&  other)

Move assignment

Here is the call graph for this function:

§ read()

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.

Parameters
xColumn number of top left corner
yRow number of top left corner
widthWidth of reading fragment
heightHeight of reading fragment
Here is the call graph for this function:
Here is the caller graph for this function:

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