26 #ifndef __TERRALIB_RASTER_INTERNAL_TILEINDEXER_H
27 #define __TERRALIB_RASTER_INTERNAL_TILEINDEXER_H
30 #include "../geometry/Point.h"
31 #include "../geometry/Polygon.h"
32 #include "../geometry/LinearRing.h"
33 #include "../geometry/Coord2D.h"
58 typedef std::vector<std::pair<unsigned int, unsigned int> >
TileSegIndex;
77 unsigned int& firstTile,
unsigned int& lastTile)
const;
130 return m_referencePolygon;
A LinearRing is a LineString that is both closed and simple.
A point with x and y coordinate values.
Polygon is a subclass of CurvePolygon whose rings are defined by linear rings.
Polygon tile indexing class for optmized geometrical relational tests.
void init()
Init internal variables.
double m_dy
Tile resolution along "y" axis.
bool getTile(const double &y, TileSegIndex **index) const
Gets tile index.
void clear()
Clear all internal resources.
~TileIndexer()
Destructor.
std::vector< TileSegIndex * > m_tileIndex
Each tile segments index vector.
TileSegIndex * m_withinTileIndexPtr
TileIndexer(const te::gm::Polygon &pol, const double &dy)
Alternative Constructor.
const TileIndexer & operator=(const TileIndexer &)
Copy overload.
TileIndexer * clone() const
Returns a clone of this instance (the caller of this method must thake the ownership of the returned ...
bool withinOrTouches(const te::gm::Point &geometry) const
It returns true if the given geometry is within or touches the indexed reference polygon.
const te::gm::Polygon & getPolygon() const
Returns the polygon.
te::gm::Coord2D m_withinVtx1
te::gm::Coord2D m_withinVtx0
bool addRing(const unsigned int &ri)
Update the tile index with the information of the supplied ring.
bool within(const te::gm::Point &geometry) const
It returns true if the given geometry is within the indexed reference polygon.
te::gm::LinearRing const * m_withinRingPtr
bool getTileIndex(const double &y, unsigned int &tileIndex) const
Gets tile index for y coordinate value.
std::vector< std::pair< unsigned int, unsigned int > > TileSegIndex
TileIndexer(const TileIndexer &)
Constructor.
const te::gm::Polygon & m_referencePolygon
Reference polygon.
bool getTileIndex(const te::gm::Point &p1, const te::gm::Point &p2, unsigned int &firstTile, unsigned int &lastTile) const
Gets tile index intervals in y direction for a given segment.
An utility struct for representing 2D coordinates.
#define TERASTEREXPORT
You can use this macro in order to export/import classes and functions from this module.
Proxy configuration file for TerraView (see terraview_config.h).