openModeller  Version 1.4.0
Map Class Reference

#include <Map.hh>

Collaboration diagram for Map:

List of all members.

Public Member Functions

 Map (Raster *rst)
 ~Map ()
MapIterator begin () const
const HeadergetHeader () 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)
GeoTransformgetGT () const
int getRowColumn (Coord x, Coord y, int *row, int *col)
void finish ()
int deleteRaster ()

Private Member Functions

 Map (const Map &)
Mapoperator= (const Map &)

Private Attributes

Raster_rst
GeoTransform_gt

Detailed Description

Responsable for the geografical and projectional transformations related to reading and writing in raster maps.

Definition at line 49 of file Map.hh.


Constructor & Destructor Documentation

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.

Parameters:
rstRaster object

Definition of Map class.

Author:
Mauro E S Muņoz <mauro@cria.org.br>
Date:
2003-09-05
Author:
Alexandre Copertino Jardim <alexcj@dpi.inpe.br>
Date:
2006-03-21
Id:
Map.cpp 5951 2014-03-31 11:55:18Z rdg

LICENSE INFORMATION

Copyright(c) 2003 by CRIA - Centro de Referencia em Informacao Ambiental

http://www.cria.org.br

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.

Here is the call graph for this function:

Map::~Map ( )

Definition at line 53 of file Map.cpp.

References _gt, and _rst.

Map::Map ( const Map ) [private]

Member Function Documentation

MapIterator Map::begin ( ) const [inline]

Definition at line 63 of file Map.hh.

References _gt, _rst, and Raster::header().

Referenced by Projector::createMap().

Here is the call graph for this function:

Deletes the associated raster.

Returns:
1 if the associated raster was deleted, 0 otherwise.

Definition at line 162 of file Map.cpp.

References _rst, and Raster::deleteRaster().

Referenced by Projector::createMap().

Here is the call graph for this function:

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

Here is the call graph for this function:

int Map::get ( Coord  x,
Coord  y,
Scalar val 
) const

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

Here is the call graph for this function:

int Map::getCell ( Coord xcel,
Coord ycel 
) const [inline]

Cell width (in map units)

Definition at line 102 of file Map.hh.

References _rst, Raster::celX(), and Raster::celY().

Referenced by main().

Here is the call graph for this function:

int Map::getDim ( int *  xdim,
int *  ydim 
) const [inline]

Map dimensions.

Definition at line 96 of file Map.hh.

References _rst, Raster::dimX(), and Raster::dimY().

Here is the call graph for this function:

int Map::getExtent ( Coord xmin,
Coord ymin,
Coord xmax,
Coord ymax 
) const

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

Here is the call graph for this function:

GeoTransform* Map::getGT ( ) const [inline]

Definition at line 127 of file Map.hh.

References _gt.

const Header& Map::getHeader ( ) const [inline]

Definition at line 68 of file Map.hh.

References _rst, and Raster::header().

Referenced by MapFormat::copyDefaults(), and Projector::createMap().

Here is the call graph for this function:

int Map::getMinMax ( Scalar min,
Scalar max 
) const [inline]

Find the minimum and maximum values in the first band.

Definition at line 84 of file Map.hh.

References _rst, and Raster::getMinMax().

Referenced by EnvironmentImpl::getMinMax().

Here is the call graph for this function:

int Map::getRowColumn ( Coord  x,
Coord  y,
int *  row,
int *  col 
)

Return row and column for the given coordinates.

Returns:
Return zero if (x,y) is not defined in the map.

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

Here is the call graph for this function:

bool Map::hasMinMax ( ) const [inline]

Definition at line 78 of file Map.hh.

References _rst, and Raster::hasMinMax().

Here is the call graph for this function:

int Map::isCategorical ( ) const [inline]

Definition at line 70 of file Map.hh.

References _rst, and Raster::isCategorical().

Here is the call graph for this function:

int Map::numBand ( ) const [inline]

Number of bands.

Definition at line 90 of file Map.hh.

References _rst, and Raster::numBand().

Referenced by draw_map(), and main().

Here is the call graph for this function:

Map& Map::operator= ( const Map ) [private]
int Map::put ( Coord  x,
Coord  y,
Scalar  val 
)

Put the values at 'val' in the first band at (x,y).

Returns:
Return zero if (x,y) is not defined in the map or the map is read only.

Definition at line 112 of file Map.cpp.

References _gt, _rst, Raster::put(), and GeoTransform::transfIn().

Referenced by Projector::createMap().

Here is the call graph for this function:

int Map::put ( Coord  x,
Coord  y 
)

Put the value for noval in the first band at (x,y).

Returns:
Return zero if (x,y) is not defined in the map or the map is read only.

Definition at line 120 of file Map.cpp.

References _gt, _rst, Raster::put(), and GeoTransform::transfIn().

Here is the call graph for this function:

void Map::setMinMax ( Scalar  min,
Scalar  max 
) [inline]

Support external specification of the min/max

Definition at line 73 of file Map.hh.

References _rst, and Raster::setMinMax().

Here is the call graph for this function:


Member Data Documentation

GeoTransform* Map::_gt [private]

Definition at line 149 of file Map.hh.

Referenced by begin(), get(), getExtent(), getGT(), getRowColumn(), Map(), put(), and ~Map().


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