openModeller
Version 1.5.0
|
Suport for a TerraLib Raster. More...
#include <TerralibRaster.hh>
Public Member Functions | |
TerralibRaster () | |
Empty Constructor. More... | |
void | createRaster (const std::string &str, int categ=0) |
Open an existing raster file or a raster in a TerraLib database (read only). More... | |
void | createRaster (const std::string &str, const MapFormat &format) |
Create a new file for projections. More... | |
~TerralibRaster () | |
int | get (Coord x, Coord y, Scalar *val) |
Fills '*val' with the map value at (x,y). More... | |
int | put (Coord x, Coord y, Scalar val) |
Put '*val' at the (x,y) coordinate. More... | |
int | put (Coord x, Coord y) |
Put 'no data val' at the (x,y) coordinate. More... | |
int | getMinMax (Scalar *min, Scalar *max) |
int | deleteRaster () |
Public Member Functions inherited from Raster | |
virtual | ~Raster () |
Header & | header () |
int | isCategorical () const |
Coord | xMin () const |
Coord | yMin () const |
Coord | xMax () const |
Coord | yMax () const |
int | dimX () const |
int | dimY () const |
Coord | celX () const |
Coord | celY () const |
Scalar | noVal () const |
int | numBand () const |
bool | hasMinMax () |
void | setMinMax (Scalar min, Scalar max) |
virtual void | finish () |
virtual bool | hasCustomGeotransform () |
virtual int | getExtentInStandardCs (Coord *xmin, Coord *ymin, Coord *xmax, Coord *ymax) |
Static Public Member Functions | |
static Raster * | CreateRasterCallback () |
Return a new instance of TerralibRaster. More... | |
Private Member Functions | |
void | openTeRaster () |
Open an existing TeRaster in a database or file disk. More... | |
void | createTeRaster () |
Create a new TeRaster in a database or file disk. More... | |
Private Attributes | |
TeDatabase * | db_ |
Pointer to database connection. More... | |
TeRaster * | raster_ |
TeRasterParams * | params_ |
TeLayer * | layer_ |
TeStringParser * | te_str_parser_ |
TerraLib DataBase string parser. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Raster | |
Raster () | |
Protected Attributes inherited from Raster | |
Scalar | f_scalefactor |
std::string | f_file |
Header | f_hdr |
Suport for a TerraLib Raster.
Manages raster files with TerraLib http://www.dpi.inpe.br/terralib/index.php .
Definition at line 51 of file TerralibRaster.hh.
|
inline |
Empty Constructor.
RasterFactory need a empty constructor.
Definition at line 64 of file TerralibRaster.hh.
Referenced by CreateRasterCallback().
TerralibRaster::~TerralibRaster | ( | ) |
Destructor
Definition at line 239 of file TerralibRaster.cpp.
References layer_, raster_, and te_str_parser_.
|
virtual |
Open an existing raster file or a raster in a TerraLib database (read only).
str | TerraLib string pointing to the raster. |
categ | if != 0 this is a categorical map (ie it can't be interpolated). Othewise this is a continuos map. |
Needed by RasterFactory..
Implements Raster.
|
virtual |
Create a new file for projections.
str | TerraLib string pointing to the raster. |
format | It is the output format specification. |
Needed by RasterFactory.
Create a new file for projections.
file | is the name of the output file |
format | is the output format specification. |
Implements Raster.
Definition at line 156 of file TerralibRaster.cpp.
References createTeRaster(), Log::error(), Raster::f_hdr, Raster::f_scalefactor, MapFormat::FloatingTiff, MapFormat::getFormat(), MapFormat::getHeight(), MapFormat::getProjection(), MapFormat::getWidth(), MapFormat::getXMax(), MapFormat::getXMin(), MapFormat::getYMax(), MapFormat::getYMin(), MapFormat::GreyBMP, MapFormat::GreyTiff, Log::instance(), params_, raster_, Header::setProj(), TeStringParser::str_, te_str_parser_, and Log::warn().
|
static |
Return a new instance of TerralibRaster.
RasterFactory calls this function to build a new Raster.
Needed by RasterFactory.
Definition at line 61 of file TerralibRaster.cpp.
References TerralibRaster().
Referenced by RasterFactory::instance().
|
private |
Create a new TeRaster in a database or file disk.
Definition at line 353 of file TerralibRaster.cpp.
References TeDatabaseManager::create(), db_, Log::error(), Raster::f_hdr, Log::instance(), TeDatabaseManager::instance(), layer_, TeStringParser::layerName_, TeStringParser::parse(), Header::proj, raster_, TeStringParser::str_, and te_str_parser_.
Referenced by createRaster().
|
virtual |
Deletes the associated raster.
Implements Raster.
Definition at line 412 of file TerralibRaster.cpp.
References TeDatabaseManager::create(), db_, Log::error(), Log::instance(), TeDatabaseManager::instance(), layer_, params_, raster_, and te_str_parser_.
Fills '*val' with the map value at (x,y).
Returns zero if (x,y) is out of range.
Fills '*val' with the map value at (x,y). Returns zero if (x,y) is out of range.
Implements Raster.
Definition at line 254 of file TerralibRaster.cpp.
References Header::convertLonLat2XY(), Raster::f_hdr, raster_, Header::xdim, and Header::ydim.
Finds the minimum and maximum values in the first band.
min | Pointer to minimum value |
max | Pointer to maximum value |
Implements Raster.
Definition at line 399 of file TerralibRaster.cpp.
References Raster::f_hdr.
|
private |
Open an existing TeRaster in a database or file disk.
Definition at line 319 of file TerralibRaster.cpp.
References TeDatabaseManager::create(), db_, Log::error(), Log::instance(), TeDatabaseManager::instance(), layer_, TeStringParser::layerName_, TeStringParser::parse(), raster_, TeStringParser::str_, and te_str_parser_.
Put '*val' at the (x,y) coordinate.
Returns 0 if (x,y) is out of range or the map is read only. supports only single band output files.
Put '*val' at the (x,y) coordinate. Returns 0 if (x,y) is out of range or the map is read only. supports only single band output files.
Implements Raster.
Definition at line 279 of file TerralibRaster.cpp.
References Header::convertLonLat2XY(), Raster::f_hdr, Raster::f_scalefactor, raster_, Header::xdim, and Header::ydim.
Put 'no data val' at the (x,y) coordinate.
Returns 0 if (x,y) is out of range or the map is read only. supports only single band output files.
Put 'no data val' at the (x,y) coordinate. Returns 0 if (x,y) is out of range or the map is read only. supports only single band output files.
Implements Raster.
Definition at line 300 of file TerralibRaster.cpp.
References Header::convertLonLat2XY(), Raster::f_hdr, Header::noval, raster_, Header::xdim, and Header::ydim.
|
private |
Pointer to database connection.
TerraLib DataBase Parameters
Definition at line 126 of file TerralibRaster.hh.
Referenced by createTeRaster(), deleteRaster(), and openTeRaster().
|
private |
Definition at line 129 of file TerralibRaster.hh.
Referenced by createTeRaster(), deleteRaster(), openTeRaster(), and ~TerralibRaster().
|
private |
Definition at line 128 of file TerralibRaster.hh.
Referenced by createRaster(), and deleteRaster().
|
private |
Definition at line 127 of file TerralibRaster.hh.
Referenced by createRaster(), createTeRaster(), deleteRaster(), get(), openTeRaster(), put(), and ~TerralibRaster().
|
private |
TerraLib DataBase string parser.
Definition at line 132 of file TerralibRaster.hh.
Referenced by createRaster(), createTeRaster(), deleteRaster(), openTeRaster(), and ~TerralibRaster().