openModeller
Version 1.5.0
|
#include <Map.hh>
Public Member Functions | |
Map (Raster *rst) | |
~Map () | |
MapIterator | begin () const |
const Header & | getHeader () const |
int | isCategorical () const |
void | setMinMax (Scalar min, Scalar max) |
bool | hasMinMax () const |
int | getMinMax (Scalar *min, Scalar *max) const |
int | numBand () const |
int | getExtent (Coord *xmin, Coord *ymin, Coord *xmax, Coord *ymax) const |
int | getDim (int *xdim, int *ydim) const |
int | getCell (Coord *xcel, Coord *ycel) const |
int | get (Coord x, Coord y, Scalar *val) const |
int | put (Coord x, Coord y, Scalar val) |
int | put (Coord x, Coord y) |
GeoTransform * | getGT () const |
int | getRowColumn (Coord x, Coord y, int *row, int *col) |
void | finish () |
int | deleteRaster () |
Private Member Functions | |
Map (const Map &) | |
Map & | operator= (const Map &) |
Private Attributes | |
Raster * | _rst |
GeoTransform * | _gt |
Responsable for the geografical and projectional transformations related to reading and writing in raster maps.
Map::Map | ( | Raster * | rst | ) |
Create a new map based on a predefined raster. The Map takes ownership of the Raster object pointed to by rst. It will be deleted when this is deleted.
rst | Raster object |
Definition of Map class.
LICENSE INFORMATION
Copyright(c) 2003 by CRIA - Centro de Referencia em Informacao Ambiental
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details:
http://www.gnu.org/copyleft/gpl.html
Definition at line 43 of file Map.cpp.
References _gt, _rst, GeoTransform::getDefaultCS(), Raster::header(), and Header::proj.
|
private |
|
inline |
Definition at line 63 of file Map.hh.
Referenced by Projector::createMap().
int Map::deleteRaster | ( | ) |
Deletes the associated raster.
Definition at line 162 of file Map.cpp.
References _rst, and Raster::deleteRaster().
Referenced by Projector::createMap().
void Map::finish | ( | ) |
Event that must be called to indicate when the projection is finished.
Definition at line 154 of file Map.cpp.
References _rst, and Raster::finish().
Referenced by Projector::createMap().
Fills 'val' with the map bands values at (x,y). Returns zero if (x,y) is not defined in the map.
Definition at line 104 of file Map.cpp.
References _gt, _rst, Raster::get(), and GeoTransform::transfIn().
Referenced by draw_map(), and main().
|
inline |
Get the map limits.
Definition at line 63 of file Map.cpp.
References _gt, _rst, Raster::getExtentInStandardCs(), Raster::hasCustomGeotransform(), GeoTransform::transfOut(), Raster::xMax(), Raster::xMin(), Raster::yMax(), and Raster::yMin().
Referenced by findRegion().
|
inline |
|
inline |
Definition at line 68 of file Map.hh.
Referenced by MapFormat::copyDefaults(), and Projector::createMap().
Find the minimum and maximum values in the first band.
Definition at line 84 of file Map.hh.
Referenced by EnvironmentImpl::getMinMax().
Return row and column for the given coordinates.
Definition at line 128 of file Map.cpp.
References _gt, _rst, Raster::dimX(), Raster::dimY(), GeoTransform::transfIn(), Raster::xMax(), Raster::xMin(), Raster::yMax(), and Raster::yMin().
Referenced by SamplerImpl::isSpatiallyUnique(), and SamplerImpl::spatiallyUnique().
|
inline |
Put the values at 'val' in the first band at (x,y).
Definition at line 112 of file Map.cpp.
References _gt, _rst, Raster::put(), and GeoTransform::transfIn().
Referenced by Projector::createMap().
Put the value for noval in the first band at (x,y).
Definition at line 120 of file Map.cpp.
References _gt, _rst, Raster::put(), and GeoTransform::transfIn().
|
private |
Definition at line 149 of file Map.hh.
Referenced by get(), getExtent(), getRowColumn(), Map(), put(), and ~Map().
|
private |
Definition at line 148 of file Map.hh.
Referenced by deleteRaster(), finish(), get(), getExtent(), getRowColumn(), Map(), put(), and ~Map().