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; }
83 Grid(
unsigned int nCols = 0,
unsigned int nRows = 0,
98 Grid(
unsigned int nCols,
unsigned int nRows,
99 double resX,
double resY,
114 Grid(
unsigned int nCols,
unsigned int nRows,
115 double resX,
double resY,
128 Grid(
double resX,
double resY,
141 Grid(
const double geoTrans[],
unsigned int nCols,
unsigned int nRows,
168 void setNumberOfColumns(
unsigned int nCols);
171 unsigned int getNumberOfColumns()
const;
178 void setNumberOfRows(
unsigned int nRows);
181 unsigned int getNumberOfRows()
const;
195 void setGeoreference(
const te::gm::Coord2D& ulLocation,
int srid,
double resX,
double resY);
208 void setGeoreference(
const double geoTrans[],
int srid);
211 const double* getGeoreference()
const;
214 double getResolutionX()
const;
217 double getResolutionY()
const;
223 void setSRID(
int srid);
239 void gridToGeo(
const double& col,
const double& row,
double& x,
double& y)
const;
259 void geoToGrid(
const double& x,
const double& y,
double& col,
double& row)
const;
288 bool isPointInGrid(
unsigned int col,
unsigned int row)
const;
297 double m_geoTInverse[6];
300 void computeExtent()
const;
314 bool computeAffineParameters(
const double extentWidth,
315 const double extentHeight,
316 const unsigned int nColumns,
317 const unsigned int nRows,
318 const double extentULX,
319 const double extentULY,
320 double* affineParamsPtr,
321 double* inverseAffineParamsPtr )
const;
329 bool computeInverseParameters(
double*
const affineParamsPtr,
330 double* inverseAffineParamsPtr )
const;
357 #endif // __TERRALIB_RASTER_INTERNAL_GRID_H
bool isPointInGrid(unsigned int col, unsigned int row) const
#define TERASTEREXPORT
You can use this macro in order to export/import classes and functions from this module.
te::gm::Envelope * m_extent
The grid extent.
An utility struct for representing 2D coordinates.
TEDATAACCESSEXPORT te::da::Expression * operator==(const te::da::Expression &e1, const te::da::Expression &e2)
void geoToGrid(const double &x, const double &y, double &col, double &row) const
Get the grid point associated to a spatial location.
boost::shared_ptr< Grid > GridPtr
An Envelope defines a 2D rectangular region.
int m_srid
The associated SRS.
#define TE_UNKNOWN_SRS
A numeric value to represent a unknown SRS identification in TerraLib.
unsigned int m_nCols
Number of columns.
void gridToGeo(const double &col, const double &row, double &x, double &y) const
Get the spatial location of a grid point.
Configuration flags for the Raster module of TerraLib.
A rectified grid is the spatial support for raster data.
unsigned int m_nRows
Number of rows.