openModeller
Version 1.5.0
|
A common interface to rasters. More...
#include <Raster.hh>
Public Member Functions | |
virtual | ~Raster () |
virtual void | createRaster (const std::string &source, int categ=0)=0 |
virtual void | createRaster (const std::string &source, const MapFormat &format)=0 |
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 |
virtual int | get (Coord px, Coord py, Scalar *val)=0 |
virtual int | put (Coord px, Coord py, Scalar val)=0 |
virtual int | put (Coord px, Coord py)=0 |
virtual int | getMinMax (Scalar *min, Scalar *max)=0 |
bool | hasMinMax () |
void | setMinMax (Scalar min, Scalar max) |
virtual void | finish () |
virtual int | deleteRaster ()=0 |
virtual bool | hasCustomGeotransform () |
virtual int | getExtentInStandardCs (Coord *xmin, Coord *ymin, Coord *xmax, Coord *ymax) |
Protected Member Functions | |
Raster () | |
Protected Attributes | |
Scalar | f_scalefactor |
std::string | f_file |
Header | f_hdr |
|
virtual |
Definition at line 55 of file Raster.cpp.
|
inline |
|
inline |
|
pure virtual |
Method to create a raster representation (needed by RasterFactory).
source | A string pointing to a raster source (file name, URL, etc.) |
categ | Indicates if the raster is categorical or not |
Implemented in RemoteRaster, WcsProxyRaster, TerralibRaster, and GdalRaster.
Referenced by RasterFactory::create().
|
pure virtual |
Method to create a raster representation (needed by RasterFactory).
source | A string pointing to a raster source (file name, URL, etc.) |
format | Map format |
Implemented in RemoteRaster, WcsProxyRaster, TerralibRaster, and GdalRaster.
|
pure virtual |
Method to delete a raster.
Implemented in GdalRaster, TerralibRaster, RemoteRaster, and WcsProxyRaster.
Referenced by Map::deleteRaster().
|
inline |
Returns the longitudinal map dimension.
Definition at line 93 of file Raster.hh.
Referenced by Map::getRowColumn().
|
inline |
Returns the latitudinal map dimension.
Definition at line 96 of file Raster.hh.
Referenced by Map::getRowColumn().
|
inlinevirtual |
Event that must be called to indicate when the projection is finished.
Reimplemented in GdalRaster, RemoteRaster, and WcsProxyRaster.
Definition at line 154 of file Raster.hh.
Referenced by Map::finish().
Fills '*val' with the map value at (x,y).
px | Longitude |
py | Latitude |
val | Value |
Implemented in GdalRaster, and TerralibRaster.
Referenced by Map::get().
|
inlinevirtual |
Calculates the raster extent in openModeller's standard coordinate system. IMPORTANT: Call this only if hasCustomGeotransform returns true. When interacting with Map objects, use Map.getExtent instead, which encapsulates a call to this method when necessary. For some projections, such as lambert azimuth equal area, getting the raster extent through manual coordinate conversion, as was usually done in the Map.getExtent, can be problematic. This method provides a way for raster implementations to better perform the task of calculating the extent.
xmin | Pointer to minimum X value |
ymin | Pointer to minimum Y value |
xmax | Pointer to maximum X value |
ymax | Pointer to maximum Y value |
Reimplemented in GdalRaster.
Definition at line 180 of file Raster.hh.
Referenced by Map::getExtent().
Finds the minimum and maximum values in the first band.
min | Pointer to minimum value |
max | Pointer to maximum value |
Implemented in GdalRaster, and TerralibRaster.
|
inlinevirtual |
Indicates if the raster has a better way to carry out conversions from its own coordinate system to the standard system used by openModeller.
Reimplemented in GdalRaster.
Definition at line 165 of file Raster.hh.
Referenced by Map::getExtent().
|
inline |
|
inline |
Returns the header.
Definition at line 75 of file Raster.hh.
Referenced by RequestFile::_setProjection(), Map::Map(), and MapFormat::MapFormat().
|
inline |
|
inline |
|
inline |
Put 'val' at the (x,y) coordinate. Supports only single band output files.
px | Longitude |
py | Latitude |
val | Value |
Implemented in GdalRaster, RemoteRaster, TerralibRaster, and WcsProxyRaster.
Referenced by Map::put().
Put 'no data val' at the (x,y) coordinate. Supports only single band files.
px | Longitude |
py | Latitude |
Implemented in GdalRaster, RemoteRaster, TerralibRaster, and WcsProxyRaster.
Support external specification of min/max.
min | Minimum value |
max | Maximum value |
Definition at line 61 of file Raster.cpp.
References f_hdr, min(), Header::minmax, Header::vmax, and Header::vmin.
|
inline |
Returns the highest longitude.
Definition at line 87 of file Raster.hh.
Referenced by Map::getExtent(), and Map::getRowColumn().
|
inline |
Returns the lowest longitude.
Definition at line 81 of file Raster.hh.
Referenced by Map::getExtent(), and Map::getRowColumn().
|
inline |
Returns the highest latitude.
Definition at line 90 of file Raster.hh.
Referenced by Map::getExtent(), and Map::getRowColumn().
|
inline |
Returns the lowest latitude.
Definition at line 84 of file Raster.hh.
Referenced by Map::getExtent(), and Map::getRowColumn().
|
protected |
Definition at line 186 of file Raster.hh.
Referenced by GdalRaster::create(), GdalRaster::deleteRaster(), GdalRaster::finish(), GdalRaster::open(), GdalRaster::write(), and GdalRaster::~GdalRaster().
|
protected |
Definition at line 192 of file Raster.hh.
Referenced by GdalRaster::calcMinMax(), GdalRaster::create(), TerralibRaster::createRaster(), TerralibRaster::createTeRaster(), GdalRaster::get(), TerralibRaster::get(), TerralibRaster::getMinMax(), GdalRaster::getMinMax(), GdalRaster::iget(), GdalRaster::initBuffer(), GdalRaster::loadRow(), GdalRaster::open(), TerralibRaster::put(), GdalRaster::put(), GdalRaster::read(), setMinMax(), and GdalRaster::write().
|
protected |
Definition at line 184 of file Raster.hh.
Referenced by TerralibRaster::createRaster(), TerralibRaster::put(), and GdalRaster::put().