This class implements the strategy to iterate with spatial restriction, the iteration occurs inside a line. More...
#include <PositionIterator.h>
Public Member Functions | |
unsigned int | getColumn () const |
Returns the current column in iterator. | |
unsigned int | getRow () const |
Returns the current row in iterator. | |
LineIterator () | |
LineIterator (const LineIterator &rhs) | |
Copy constructor. | |
LineIterator (const te::rst::Raster *r, const te::gm::Line *l) | |
Constructor. | |
bool | operator!= (const AbstractPositionIterator< T > &rhs) const |
Difference operator. | |
bool | operator!= (const LineIterator< T > &rhs) const |
std::complex< T > | operator() (const unsigned int i) const |
Returns the complex value in current position (column, row, band) from iterator. | |
const std::vector< T > | operator* () const |
Returns a vector of the values in current position (column, row) from iterator. | |
void | operator++ () |
Advances to the next position. | |
void | operator-- () |
Returns to the previous position. | |
AbstractPositionIterator< T > & | operator= (const AbstractPositionIterator< T > &rhs) |
Assignment operator. | |
LineIterator & | operator= (const LineIterator &rhs) |
T | operator[] (const unsigned int i) const |
Returns the real value in current position (column, row, band) from iterator. | |
void | setEnd () |
Sets the iterator position to the end of the current band. | |
~LineIterator () | |
Static Public Member Functions | |
static LineIterator | begin (const te::rst::Raster *r, const te::gm::Line *l) |
Returns an iterator referring to the first value of the band. | |
static LineIterator | end (const te::rst::Raster *r, const te::gm::Line *l) |
Returns an iterator referring to after the end of the iterator. | |
Protected Attributes | |
int | m_currentpixelindex |
The index of the current pixel location. | |
const te::gm::Line * | m_line |
The spatial restriction to be applied in the iterator. | |
double | m_operatorBrackets_value |
Used by the operator[] method. | |
std::complex< double > | m_operatorParenthesis_value |
Used by the operator() method. | |
std::vector< te::gm::Point * > | m_pixelsinline |
A vector of pixel locations that intersects the line. | |
const te::rst::Raster * | m_raster |
The band from where to get the values. | |
This class implements the strategy to iterate with spatial restriction, the iteration occurs inside a line.
Definition at line 325 of file PositionIterator.h.
te::rst::LineIterator< T >::LineIterator |
Definition at line 1279 of file PositionIterator.h.
te::rst::LineIterator< T >::LineIterator | ( | const te::rst::Raster * | r, |
const te::gm::Line * | l | ||
) |
Constructor.
b | The band to iterate. |
l | The line from where the iteration will navigate. |
Definition at line 1287 of file PositionIterator.h.
References te::rst::Grid::geoToGrid(), te::gm::LineString::getEndPoint(), te::rst::Raster::getExtent(), te::gm::GetGeomFromEnvelope(), te::rst::Raster::getGrid(), te::rst::Raster::getResolutionX(), te::rst::Raster::getResolutionY(), te::rst::Raster::getSRID(), te::gm::Geometry::getSRID(), te::gm::LineString::getStartPoint(), te::rst::Grid::gridToGeo(), te::gm::Geometry::intersection(), te::gm::INTERSECTS, te::gm::Geometry::isEmpty(), te::rst::LineIterator< T >::m_line, te::rst::LineIterator< T >::m_pixelsinline, te::rst::LineIterator< T >::m_raster, te::gm::SatisfySpatialRelation(), te::rst::LineIterator< T >::setEnd(), and TE_TR.
te::rst::LineIterator< T >::LineIterator | ( | const LineIterator< T > & | rhs | ) |
Copy constructor.
rhs | The right-hand-side copy used to copy from. |
Definition at line 1350 of file PositionIterator.h.
te::rst::LineIterator< T >::~LineIterator |
Definition at line 1357 of file PositionIterator.h.
|
static |
Returns an iterator referring to the first value of the band.
Definition at line 1442 of file PositionIterator.h.
|
static |
Returns an iterator referring to after the end of the iterator.
Definition at line 1447 of file PositionIterator.h.
References te::rst::LineIterator< T >::setEnd().
|
virtual |
Returns the current column in iterator.
Implements te::rst::AbstractPositionIterator< T >.
Definition at line 1395 of file PositionIterator.h.
|
virtual |
Returns the current row in iterator.
Implements te::rst::AbstractPositionIterator< T >.
Definition at line 1390 of file PositionIterator.h.
|
virtual |
Difference operator.
rhs | The right-hand side to compare. |
Implements te::rst::AbstractPositionIterator< T >.
Definition at line 1462 of file PositionIterator.h.
References operator!=().
bool te::rst::LineIterator< T >::operator!= | ( | const LineIterator< T > & | rhs | ) | const |
Definition at line 1456 of file PositionIterator.h.
References te::rst::LineIterator< T >::m_currentpixelindex.
|
virtual |
Returns the complex value in current position (column, row, band) from iterator.
i | The band index. |
Implements te::rst::AbstractPositionIterator< T >.
Definition at line 1383 of file PositionIterator.h.
|
virtual |
Returns a vector of the values in current position (column, row) from iterator.
Implements te::rst::AbstractPositionIterator< T >.
Definition at line 1362 of file PositionIterator.h.
|
virtual |
Advances to the next position.
Implements te::rst::AbstractPositionIterator< T >.
Definition at line 1400 of file PositionIterator.h.
|
virtual |
Returns to the previous position.
Implements te::rst::AbstractPositionIterator< T >.
Definition at line 1408 of file PositionIterator.h.
|
virtual |
Assignment operator.
rhs | The right-hand-side copy used to copy from. |
Reimplemented from te::rst::AbstractPositionIterator< T >.
Definition at line 1431 of file PositionIterator.h.
te::rst::LineIterator< T > & te::rst::LineIterator< T >::operator= | ( | const LineIterator< T > & | rhs | ) |
Definition at line 1416 of file PositionIterator.h.
References te::rst::LineIterator< T >::m_currentpixelindex, te::rst::LineIterator< T >::m_line, te::rst::LineIterator< T >::m_pixelsinline, and te::rst::AbstractPositionIterator< T >::operator=().
|
virtual |
Returns the real value in current position (column, row, band) from iterator.
i | The band index. |
Implements te::rst::AbstractPositionIterator< T >.
Definition at line 1376 of file PositionIterator.h.
|
virtual |
Sets the iterator position to the end of the current band.
b | The band to retrieve the end information. |
Implements te::rst::AbstractPositionIterator< T >.
Definition at line 1437 of file PositionIterator.h.
Referenced by te::rst::LineIterator< T >::end(), and te::rst::LineIterator< T >::LineIterator().
|
protected |
The index of the current pixel location.
Definition at line 382 of file PositionIterator.h.
Referenced by te::rst::LineIterator< T >::operator!=(), and te::rst::LineIterator< T >::operator=().
|
protected |
The spatial restriction to be applied in the iterator.
Definition at line 381 of file PositionIterator.h.
Referenced by te::rst::LineIterator< T >::LineIterator(), and te::rst::LineIterator< T >::operator=().
|
mutableprotected |
Used by the operator[] method.
Definition at line 384 of file PositionIterator.h.
|
mutableprotected |
Used by the operator() method.
Definition at line 385 of file PositionIterator.h.
|
protected |
A vector of pixel locations that intersects the line.
Definition at line 383 of file PositionIterator.h.
Referenced by te::rst::LineIterator< T >::LineIterator(), and te::rst::LineIterator< T >::operator=().
|
protected |
The band from where to get the values.
Definition at line 380 of file PositionIterator.h.
Referenced by te::rst::LineIterator< T >::LineIterator().