26#ifndef __TERRALIB_RASTER_INTERNAL_GRID_H
27#define __TERRALIB_RASTER_INTERNAL_GRID_H
35#include <boost/shared_ptr.hpp>
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,
141 Grid(
const double geoTrans[],
unsigned int nCols,
unsigned int nRows,
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;
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;
330 double* inverseAffineParamsPtr )
const;
An utility struct for representing 2D coordinates.
An Envelope defines a 2D rectangular region.
void gridToGeo(const double &col, const double &row, double &x, double &y) const
Get the spatial location of a grid point.
double m_geoT[6]
A list of 6 coefficients describing an affine transformation to georeference a grid.
bool computeInverseParameters(double *const affineParamsPtr, double *inverseAffineParamsPtr) const
Compute inverse affine parameters.
void setSRID(int srid)
Just sets the grid spatial reference system identifier.
int getSRID() const
Returns the grid spatial reference system identifier.
void setGeoreference(const te::gm::Coord2D &ulLocation, int srid, double resX, double resY)
Sets the information needed to georeference the grid.
const te::gm::Envelope * getExtent() const
Returns the geographic extension of the grid.
Grid & operator=(const Grid &rhs)
Assignment operator.
unsigned int getNumberOfColumns() const
Returns the grid number of columns.
double m_geoTInverse[6]
A list of 6 coefficients describing an inverse affine transformation to georeference a grid.
double getResolutionY() const
Returns the grid vertical (y-axis) resolution.
bool isPointInGrid(unsigned int col, unsigned int row) const
void setNumberOfRows(unsigned int nRows)
Sets the grid number of rows.
unsigned int getNumberOfRows() const
Returns the grid number of rows.
void setNumberOfColumns(unsigned int nCols)
Sets the grid number of columns.
int m_srid
The associated SRS.
unsigned int m_nCols
Number of columns.
unsigned int m_nRows
Number of rows.
bool operator==(const Grid &rhs) const
Equal operator.
const double * getGeoreference() const
Returns a list of 6 coefficients describing an affine transformation to georeference a grid.
void setGeoreference(const double geoTrans[], int srid)
Sets the information needed to georeference the grid using an affine transformation.
bool computeAffineParameters(const double extentWidth, const double extentHeight, const unsigned int nColumns, const unsigned int nRows, const double extentULX, const double extentULY, double *affineParamsPtr, double *inverseAffineParamsPtr) const
Compute affine parameters from the given input parameters.
Grid(double resX, double resY, te::gm::Envelope *mbr, int srid=TE_UNKNOWN_SRS)
Constructor.
void geoToGrid(const double &x, const double &y, double &col, double &row) const
Get the grid point associated to a spatial location.
te::gm::Envelope * getExtent()
Returns the geographic extension of the grid.
void computeExtent() const
Computes the geographic extension of the grid.
Grid(unsigned int nCols, unsigned int nRows, double resX, double resY, const te::gm::Coord2D *ulc, int srid=TE_UNKNOWN_SRS)
Constructor.
te::gm::Envelope * m_extent
The grid extent.
Grid(const Grid &rhs)
Copy constructor.
Grid(unsigned int nCols=0, unsigned int nRows=0, te::gm::Envelope *mbr=0, int srid=TE_UNKNOWN_SRS)
Constructor.
Grid(unsigned int nCols, unsigned int nRows, double resX, double resY, te::gm::Envelope *mbr, int srid=TE_UNKNOWN_SRS)
Constructor.
double getResolutionX() const
Returns the grid horizontal (x-axis) resolution.
Grid(const double geoTrans[], unsigned int nCols, unsigned int nRows, int srid=TE_UNKNOWN_SRS)
Constructor.
Namespace for the Vector Geometry module of TerraLib.
Namespace for the Raster module of TerraLib.
boost::shared_ptr< Grid > GridPtr
An utility struct for representing 2D coordinates.
Configuration flags for the Raster module of TerraLib.
#define TERASTEREXPORT
You can use this macro in order to export/import classes and functions from this module.
Configuration flags for the TerraLib SRS module.
#define TE_UNKNOWN_SRS
A numeric value to represent a unknown SRS identification in TerraLib.