![]() |
TerraLib 4.1
|
A class that represents a fixed grid. More...
#include <TeGridIndex.h>
Public Types | |
| typedef pair< int, int > | gridKey |
| grid column/line cell index | |
| typedef multimap< gridKey, unsigned int > | gridType |
| grid structure | |
Public Member Functions | |
| TeGridIndex () | |
| Empty constructor. | |
| TeGridIndex (const TeBox &b, const double &resX, const double &resY) | |
| Constructor of the grid. | |
| void | setBox (const TeBox &b) |
| Adjusts grid bounding box. | |
| unsigned int | size () const |
| Returns the number of associatade cells. | |
| void | setResolution (const double &resX, const double &resY) |
| Sets grid resolution factor. | |
| int | getNumCols () const |
| Return number of columns. | |
| int | getNumLines () const |
| Return number of lines. | |
| bool | isValid () const |
| Tells if the grid definition is correct. | |
| void | insert (const TeCoord2D &c, const unsigned int &itemId) |
| Inserts an item with one coordinate. | |
| void | getIndex (const TeCoord2D &c1, const TeCoord2D &c2, int &col1, int &line1, int &col2, int &line2) |
| Returns lower and upper grid positions. | |
| void | insert (const TeCoord2D &c1, const TeCoord2D &c2, const unsigned int &itemId) |
| Inserts intem into the grid. | |
| void | indexLine (const TeLine2D &l) |
| Put line segments over the grid cells. | |
| gridType & | getGrid () |
| Return a reference for internal grid representation. | |
| void | getLines (TeLineSet &lset) |
| Only for debug purpose. | |
Public Attributes | |
| double | dx_ |
| grid resolution in x axis. | |
| double | dy_ |
| grid resolution in y axis. | |
| int | npartsX_ |
| Number of columns. | |
| int | npartsY_ |
| Number of lines. | |
| double | xi_ |
| Lower left x. | |
| double | yi_ |
| Lower left y. | |
| double | xf_ |
| Upper right x. | |
| double | yf_ |
| Upper right y. | |
| gridType | grid_ |
| the grid. | |
| unsigned int | size_ |
| Number of elements in the grid (if one element intersects more than one grid cell, they will count many times). | |
A class that represents a fixed grid.
WARNING:
1. XXXX
2. XXXX.
3.
| typedef pair<int, int> TeSAM::TeGridIndex::gridKey |
grid column/line cell index
| typedef multimap<gridKey, unsigned int> TeSAM::TeGridIndex::gridType |
grid structure
| TeSAM::TeGridIndex::TeGridIndex | ( | ) | [inline] |
Empty constructor.
| TeSAM::TeGridIndex::TeGridIndex | ( | const TeBox & | b, |
| const double & | resX, | ||
| const double & | resY | ||
| ) | [inline] |
Constructor of the grid.
| gridType& TeSAM::TeGridIndex::getGrid | ( | ) | [inline] |
Return a reference for internal grid representation.
| void TeSAM::TeGridIndex::getIndex | ( | const TeCoord2D & | c1, |
| const TeCoord2D & | c2, | ||
| int & | col1, | ||
| int & | line1, | ||
| int & | col2, | ||
| int & | line2 | ||
| ) | [inline] |
Returns lower and upper grid positions.
| void TeSAM::TeGridIndex::getLines | ( | TeLineSet & | lset | ) | [inline] |
Only for debug purpose.
| int TeSAM::TeGridIndex::getNumCols | ( | ) | const [inline] |
Return number of columns.
| int TeSAM::TeGridIndex::getNumLines | ( | ) | const [inline] |
Return number of lines.
| void TeSAM::TeGridIndex::indexLine | ( | const TeLine2D & | l | ) | [inline] |
Put line segments over the grid cells.
| void TeSAM::TeGridIndex::insert | ( | const TeCoord2D & | c1, |
| const TeCoord2D & | c2, | ||
| const unsigned int & | itemId | ||
| ) | [inline] |
Inserts intem into the grid.
| void TeSAM::TeGridIndex::insert | ( | const TeCoord2D & | c, |
| const unsigned int & | itemId | ||
| ) | [inline] |
Inserts an item with one coordinate.
| bool TeSAM::TeGridIndex::isValid | ( | ) | const [inline] |
Tells if the grid definition is correct.
| void TeSAM::TeGridIndex::setBox | ( | const TeBox & | b | ) | [inline] |
Adjusts grid bounding box.
| void TeSAM::TeGridIndex::setResolution | ( | const double & | resX, |
| const double & | resY | ||
| ) | [inline] |
Sets grid resolution factor.
| unsigned int TeSAM::TeGridIndex::size | ( | ) | const [inline] |
Returns the number of associatade cells.
| double TeSAM::TeGridIndex::dx_ |
grid resolution in x axis.
| double TeSAM::TeGridIndex::dy_ |
grid resolution in y axis.
the grid.
Number of columns.
Number of lines.
| unsigned int TeSAM::TeGridIndex::size_ |
Number of elements in the grid (if one element intersects more than one grid cell, they will count many times).
| double TeSAM::TeGridIndex::xf_ |
Upper right x.
| double TeSAM::TeGridIndex::xi_ |
Lower left x.
| double TeSAM::TeGridIndex::yf_ |
Upper right y.
| double TeSAM::TeGridIndex::yi_ |
Lower left y.