Polygon tile indexing class for optmized geometrical relational tests. More...
#include <TileIndexer.h>
| Public Types | |
| typedef std::vector< std::pair< unsigned int, unsigned int > > | TileSegIndex | 
| Public Member Functions | |
| bool | addRing (const unsigned int &ri) | 
| Update the tile index with the information of the supplied ring.  More... | |
| void | clear () | 
| Clear all internal resources.  More... | |
| TileIndexer * | clone () const | 
| Returns a clone of this instance (the caller of this method must thake the ownership of the returned pointer).  More... | |
| const te::gm::Polygon & | getPolygon () const | 
| Returns the polygon.  More... | |
| bool | getTile (const double &y, TileSegIndex **index) const | 
| Gets tile index.  More... | |
| TileIndexer (const TileIndexer &) | |
| Constructor.  More... | |
| TileIndexer (const te::gm::Polygon &pol, const double &dy) | |
| Alternative Constructor.  More... | |
| bool | within (const te::gm::Point &geometry) const | 
| It returns true if the given geometry is within the indexed reference polygon.  More... | |
| bool | withinOrTouches (const te::gm::Point &geometry) const | 
| It returns true if the given geometry is within or touches the indexed reference polygon.  More... | |
| ~TileIndexer () | |
| Destructor.  More... | |
| Protected Member Functions | |
| 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.  More... | |
| bool | getTileIndex (const double &y, unsigned int &tileIndex) const | 
| Gets tile index for y coordinate value.  More... | |
| void | init () | 
| Init internal variables.  More... | |
| const TileIndexer & | operator= (const TileIndexer &) | 
| Copy overload.  More... | |
| Protected Attributes | |
| double | m_dy | 
| Tile resolution along "y" axis.  More... | |
| const te::gm::Polygon & | m_referencePolygon | 
| Reference polygon.  More... | |
| std::vector< TileSegIndex * > | m_tileIndex | 
| Each tile segments index vector.  More... | |
| bool | m_withinIsInside | 
| te::gm::LinearRing const * | m_withinRingPtr | 
| TileSegIndex * | m_withinTileIndexPtr | 
| double | m_withinTileX | 
| double | m_withinTileY | 
| te::gm::Coord2D | m_withinVtx0 | 
| te::gm::Coord2D | m_withinVtx1 | 
| int | m_withinYEquals | 
| int | m_withinYFlag0 | 
| int | m_withinYFlag1 | 
Polygon tile indexing class for optmized geometrical relational tests.
Definition at line 54 of file TileIndexer.h.
| typedef std::vector<std::pair<unsigned int, unsigned int> > te::rst::TileIndexer::TileSegIndex | 
Definition at line 58 of file TileIndexer.h.
| te::rst::TileIndexer::TileIndexer | ( | const TileIndexer & | ) | 
Constructor.
| te::rst::TileIndexer::TileIndexer | ( | const te::gm::Polygon & | pol, | 
| const double & | dy | ||
| ) | 
Alternative Constructor.
| pol | The polygon to index. | 
| dy | Tile size along "y" axis. | 
| te::rst::TileIndexer::~TileIndexer | ( | ) | 
Destructor.
| bool te::rst::TileIndexer::addRing | ( | const unsigned int & | ri | ) | 
Update the tile index with the information of the supplied ring.
| ri | The ring index. | 
| void te::rst::TileIndexer::clear | ( | ) | 
Clear all internal resources.
| TileIndexer* te::rst::TileIndexer::clone | ( | ) | const | 
Returns a clone of this instance (the caller of this method must thake the ownership of the returned pointer).
| 
 | inline | 
Returns the polygon.
Definition at line 128 of file TileIndexer.h.
| bool te::rst::TileIndexer::getTile | ( | const double & | y, | 
| TileSegIndex ** | index | ||
| ) | const | 
Gets tile index.
| y | The Y value. | 
| index | Output tile pointer. | 
| 
 | protected | 
Gets tile index intervals in y direction for a given segment.
| p1 | First segment coordinate. | 
| p2 | Second segment coordinate. | 
| firstTile | The first tile index that this segment intersects. | 
| lastTile | The last tile index that this segment intersects. | 
| 
 | protected | 
Gets tile index for y coordinate value.
| y | Value of "y" coordinate. | 
| tileIndex | Index of corresponding tile. | 
| 
 | protected | 
Init internal variables.
| 
 | protected | 
Copy overload.
| bool te::rst::TileIndexer::within | ( | const te::gm::Point & | geometry | ) | const | 
It returns true if the given geometry is within the indexed reference polygon.
| rhs | The other geometry to be compared. | 
| bool te::rst::TileIndexer::withinOrTouches | ( | const te::gm::Point & | geometry | ) | const | 
It returns true if the given geometry is within or touches the indexed reference polygon.
| rhs | The other geometry to be compared. | 
| 
 | protected | 
Tile resolution along "y" axis.
Definition at line 158 of file TileIndexer.h.
| 
 | protected | 
Reference polygon.
Definition at line 159 of file TileIndexer.h.
| 
 | protected | 
Each tile segments index vector.
Definition at line 160 of file TileIndexer.h.
| 
 | mutableprotected | 
Definition at line 167 of file TileIndexer.h.
| 
 | mutableprotected | 
Definition at line 171 of file TileIndexer.h.
| 
 | mutableprotected | 
Definition at line 164 of file TileIndexer.h.
| 
 | mutableprotected | 
Definition at line 166 of file TileIndexer.h.
| 
 | mutableprotected | 
Definition at line 165 of file TileIndexer.h.
| 
 | mutableprotected | 
Definition at line 172 of file TileIndexer.h.
| 
 | mutableprotected | 
Definition at line 173 of file TileIndexer.h.
| 
 | mutableprotected | 
Definition at line 170 of file TileIndexer.h.
| 
 | mutableprotected | 
Definition at line 168 of file TileIndexer.h.
| 
 | mutableprotected | 
Definition at line 169 of file TileIndexer.h.