26 #ifndef __TERRALIB_RASTER_INTERNAL_GRID_H
27 #define __TERRALIB_RASTER_INTERNAL_GRID_H
30 #include "../geometry/Coord2D.h"
31 #include "../srs/Config.h"
35 #include <boost/shared_ptr.hpp>
40 namespace gm {
class Envelope; }
70 Grid(
unsigned int nCols = 0,
unsigned int nRows = 0,
85 Grid(
unsigned int nCols,
unsigned int nRows,
86 double resX,
double resY,
101 Grid(
unsigned int nCols,
unsigned int nRows,
102 double resX,
double resY,
115 Grid(
double resX,
double resY,
128 Grid(
const double geoTrans[],
unsigned int nCols,
unsigned int nRows,
155 void setNumberOfColumns(
unsigned int nCols);
158 unsigned int getNumberOfColumns()
const;
165 void setNumberOfRows(
unsigned int nRows);
168 unsigned int getNumberOfRows()
const;
182 void setGeoreference(
const te::gm::Coord2D& ulLocation,
int srid,
double resX,
double resY);
201 void setGeoreference(
const double geoTrans[],
int srid);
204 const double* getGeoreference()
const;
207 double getResolutionX()
const;
210 double getResolutionY()
const;
216 void setSRID(
int srid);
225 void computeExtent()
const;
235 void gridToGeo(
const double& col,
const double& row,
double& x,
double& y)
const;
255 void geoToGrid(
const double& x,
const double& y,
double& col,
double& row)
const;
284 bool isPointInGrid(
unsigned int col,
unsigned int row)
const;
319 #endif // __TERRALIB_RASTER_INTERNAL_GRID_H
boost::shared_ptr< Grid > GridPtr
te::gm::Envelope * m_extent
The grid extent.
int m_srid
The associated SRS.
#define TE_UNKNOWN_SRS
A numeric value to represent a unknown SRS identification in TerraLib.
An utility struct for representing 2D coordinates.
te::da::Expression * operator==(const te::da::Expression &e1, const te::da::Expression &e2)
A rectified grid is the spatial support for raster data.
#define TERASTEREXPORT
You can use this macro in order to export/import classes and functions from this module.
bool isPointInGrid(unsigned int col, unsigned int row) const
void gridToGeo(const double &col, const double &row, double &x, double &y) const
Get the spatial location of a grid point.
unsigned int m_nRows
Number of rows.
An Envelope defines a 2D rectangular region.
Configuration flags for the Raster module of TerraLib.
void geoToGrid(const double &x, const double &y, double &col, double &row) const
Get the grid point associated to a spatial location.
unsigned int m_nCols
Number of columns.