Jafar
|
traversability raster band, data type in unsigned char (0-255) expressing the trav probability of each raster cell More...
traversability raster band, data type in unsigned char (0-255) expressing the trav probability of each raster cell
Definition at line 78 of file RasterBand.hpp.
#include <RasterBand.hpp>
Public Member Functions | |
GDRasterBand (GDALDataset *_dataset, GDALRasterBand *_band, double _weight=1.0, double _decompositionLimit=8.0, FUSION_METHOD _fmethod=MEAN, HOMOGENEOUS_TYPE _homogType=SIGMA) | |
Constructor. | |
void | setGDALRasterBand (GDALRasterBand *_band) |
GDALRasterBand * | getGDALRasterBand () |
double | getWeight () |
int | getTypeSize () const |
GDALDataType | getType () const |
int | getxroot () const |
int | getyroot () const |
int | getxsize () const |
Get band X size in pixels. | |
int | getysize () const |
Get band Y size in pixels. | |
double | getxsize_m () const |
Get band X size in meters according to the dataset resolution. | |
double | getysize_m () const |
Get band Y size in meters according to the dataset resolution. | |
double | getxsize_m (const RasterRect &rect) const |
Get rectangle 'rect' X size in meters according to the dataset resolution. | |
double | getysize_m (const RasterRect &rect) const |
Get rectangle 'rect' Y size in meters according to the dataset resolution. | |
double | getScale () const |
void | reset (T _v) |
Reset band values to _v. | |
T | getValue (const RasterPoint &rpt) const |
T | getValue (int i) const |
T * | getValuePtr () const |
Returns the values address. | |
bool | getValue (const int &x, const int &y, void *value) const |
Getting value through the GDAL RasterIO function. | |
T | get (const RasterCellIndex &cell) const |
Get the value : i = index of the line, j = index of the colums these methods access data in the memory and not from the gdal buffer, this way is faster that the traditional way offered by GDAL. | |
bool | get (const RasterRect &rect, std::vector< T > &v) const |
double | getDecompositionLimit () |
Return the value of the quadtree decomposition limit. | |
void | setValue (const RasterCellIndex &cell, T value) const |
void | setValue (const int index, T value) const |
void | setScale (double _scale) |
void | setDecompositionLimit (double _dl) |
Set the value of the quadtree decomposition limit. | |
bool | sameValue (const RasterRect &rect) const |
Returns true when all cells in the raster rect are equals. | |
bool | nearlySameValue (const RasterRect &rect) const |
Returns true when all cells in the raster rect are nearly equals. | |
bool | sigmaSameValue (const RasterRect &rect) const |
Returns true when all cells in the raster rect are nearly equals. | |
void | setProbabilityLag (T newProbaLag) |
Set the probability lag. | |
void | setSigmaFactor (T newSigmaFactor) |
Set the sigma Factor. | |
T | getProbabilityLag () const |
Get the probability lag. | |
T | getSigmaFactor () const |
Get the probability lag. | |
double | mean (const RasterRect &rect) const |
Calculates the mean value of data in a raster rectangle. | |
double | sd (const RasterRect &rect) const |
virtual bool | isHomogeneous (const RasterRect &rect) const =0 |
Abstract methods from abstract class Raster. | |
HOMOGENEOUS_TYPE | getHomogeneousType () const |
Returns the homogeneity type. | |
void | setHomogeneousType (HOMOGENEOUS_TYPE hhh) |
Set the homogeneity type with an HOMOGENEOUS_TYPE enumeration value. | |
bool | bufferToMem () |
Buffer the data from the GDAL dataset's band to memory (values) and make the conversion from input. | |
bool | memToBuffer () |
Writing allocated data (values) to the GDALRasterBand buffer. | |
Protected Attributes | |
GDALDataset * | dataset |
Main GDAL dataset to which the raster band refers. | |
int | xsize |
X Size of the raster data in the dataset This is the number of pixel on the X Axis. | |
int | ysize |
Y Size of the raster data in the dataset This is the number of pixel on the Y Axis. | |
double | absWEResolution |
Absolute Resolution on West-East axis. | |
double | absNSResolution |
Absolute Resolution on North-South axis. | |
GDALRasterBand * | band |
the gdal raster band containing the data | |
GDALDataType | dataType |
Type of a piece of data in a raster band (int, float...) | |
double | weight |
the weight of the data in the linear combination of global cost value | |
double | decompositionLimit |
Decomposition Limit. | |
FUSION_METHOD | fmethod |
Fusion Method. | |
T * | values |
One dimension Raster Data. | |
T | probabilityLag |
Admissible offset around a zone area to consider it nearly homogeneous. | |
T | sigmaFactor |
Factor for admissible values in |mean - this_factor * sigma|. | |
HOMOGENEOUS_TYPE | homogType |
Type of homogeneity test that will be done in the isHomogeneous method. | |
Private Member Functions | |
BOOST_STATIC_ASSERT (DataType< T >::value) | |
check if T is one of the accepted types by RasterBand |
jafar::lgl::GDRasterBand< T >::GDRasterBand | ( | GDALDataset * | _dataset, |
GDALRasterBand * | _band, | ||
double | _weight = 1.0 , |
||
double | _decompositionLimit = 8.0 , |
||
FUSION_METHOD | _fmethod = MEAN , |
||
HOMOGENEOUS_TYPE | _homogType = SIGMA |
||
) |
Constructor.
Raster band storing information like traversability or landmark, the input file could be of type 8 bit unsigned int or 16 bit unsigned int.
Default decomposition limit is 8.0 meters. Cells larger than this limit will be forced for decomposition.
_dataset | GDAL Dataset source of the general information |
_band | GDAL Band used to fill the created raster Band |
_weight | The ponderation of this band while considering all the bands |
_decompositionLimit | The quadtree decomposition limit in meters |
_fmethod | Fusion method when fusin with external data |
Definition at line 326 of file RasterBand.hpp.
References jafar::lgl::GDRasterBand< T >::absNSResolution, jafar::lgl::GDRasterBand< T >::absWEResolution, jafar::lgl::GDRasterBand< T >::band, jafar::lgl::GDRasterBand< T >::bufferToMem(), jafar::lgl::GDRasterBand< T >::dataset, jafar::lgl::GDRasterBand< T >::dataType, jafar::lgl::GDRasterBand< T >::setProbabilityLag(), jafar::lgl::GDRasterBand< T >::setSigmaFactor(), jafar::lgl::GDRasterBand< T >::values, jafar::lgl::GDRasterBand< T >::xsize, and jafar::lgl::GDRasterBand< T >::ysize.
bool jafar::lgl::GDRasterBand< T >::bufferToMem | ( | ) |
Buffer the data from the GDAL dataset's band to memory (values) and make the conversion from input.
Definition at line 377 of file RasterBand.hpp.
Referenced by jafar::lgl::GDRasterBand< T >::GDRasterBand().
T jafar::lgl::GDRasterBand< T >::getProbabilityLag | ( | ) | const |
T jafar::lgl::GDRasterBand< T >::getSigmaFactor | ( | ) | const |
bool jafar::lgl::GDRasterBand< T >::getValue | ( | const int & | x, |
const int & | y, | ||
void * | value | ||
) | const |
Getting value through the GDAL RasterIO function.
Get Values directly from the GDAL Raster Band. (Slower for seldom values) get method using GDAL access function throught file buffering RasterIO method this is slow comparing to accessing the value directly from the buffered data (values data member) value should be already allocated
Definition at line 543 of file RasterBand.hpp.
T * jafar::lgl::GDRasterBand< T >::getValuePtr | ( | ) | const |
double jafar::lgl::GDRasterBand< T >::mean | ( | const RasterRect & | rect | ) | const |
Calculates the mean value of data in a raster rectangle.
Definition at line 794 of file RasterBand.hpp.
References jafar::lgl::RasterRect::size().
bool jafar::lgl::GDRasterBand< T >::nearlySameValue | ( | const RasterRect & | rect | ) | const |
Returns true when all cells in the raster rect are nearly equals.
rect | delimited zone to watch |
Definition at line 635 of file RasterBand.hpp.
References jafar::lgl::RasterRect::xsize(), jafar::lgl::RasterRect::xtopleft, jafar::lgl::RasterRect::ysize(), and jafar::lgl::RasterRect::ytopleft.
bool jafar::lgl::GDRasterBand< T >::sameValue | ( | const RasterRect & | rect | ) | const |
Returns true when all cells in the raster rect are equals.
rect | delimited zone to watch |
Definition at line 581 of file RasterBand.hpp.
References jafar::lgl::RasterRect::xsize(), jafar::lgl::RasterRect::xtopleft, jafar::lgl::RasterRect::ysize(), and jafar::lgl::RasterRect::ytopleft.
void jafar::lgl::GDRasterBand< T >::setProbabilityLag | ( | T | newProbaLag | ) |
Set the probability lag.
Definition at line 623 of file RasterBand.hpp.
Referenced by jafar::lgl::GDRasterBand< T >::GDRasterBand().
void jafar::lgl::GDRasterBand< T >::setSigmaFactor | ( | T | newSigmaFactor | ) |
Set the sigma Factor.
Definition at line 629 of file RasterBand.hpp.
Referenced by jafar::lgl::GDRasterBand< T >::GDRasterBand().
bool jafar::lgl::GDRasterBand< T >::sigmaSameValue | ( | const RasterRect & | rect | ) | const |
Returns true when all cells in the raster rect are nearly equals.
rect | delimited zone to watch |
Definition at line 702 of file RasterBand.hpp.
References jafar::lgl::RasterRect::xsize(), jafar::lgl::RasterRect::xtopleft, jafar::lgl::RasterRect::ysize(), and jafar::lgl::RasterRect::ytopleft.
double jafar::lgl::GDRasterBand< T >::decompositionLimit [protected] |
Decomposition Limit.
During the quadtree decomposition every cells larger than this limit will be decomposed.
Definition at line 273 of file RasterBand.hpp.
HOMOGENEOUS_TYPE jafar::lgl::GDRasterBand< T >::homogType [protected] |
Type of homogeneity test that will be done in the isHomogeneous method.
It can be interpreted differently according to the children class.
Definition at line 312 of file RasterBand.hpp.
T jafar::lgl::GDRasterBand< T >::probabilityLag [protected] |
Admissible offset around a zone area to consider it nearly homogeneous.
Parameter used in the terraing segmentation during the quadtree decomposition
Definition at line 294 of file RasterBand.hpp.
T jafar::lgl::GDRasterBand< T >::sigmaFactor [protected] |
Factor for admissible values in |mean - this_factor * sigma|.
From 0.0 to 3.0 are good values. Less than 0.0 will generate an always-false result (no homogeneity) while values more 3.0 will generate full homogeneity and create partitions with barely identical terrain states. Default is 1.5
Definition at line 306 of file RasterBand.hpp.
T* jafar::lgl::GDRasterBand< T >::values [protected] |
One dimension Raster Data.
2D Raster data is held in this one dimension array by transferring the data line by line (GDALRasterIO)
Because gdal use file IN/OUTPUT buffer and does not really stock all information in the memory, so copy the data to this variables for speeding up the reading and writing speed
Definition at line 287 of file RasterBand.hpp.
Referenced by jafar::lgl::GDRasterBand< T >::GDRasterBand().
Generated on Wed Oct 15 2014 00:37:42 for Jafar by doxygen 1.7.6.1 |