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. More... | |
unsigned int | getRow () const |
Returns the current row in iterator. More... | |
LineIterator () | |
LineIterator (const te::rst::Raster *r, const te::gm::Line *l) | |
Constructor. More... | |
LineIterator (const LineIterator &rhs) | |
Copy constructor. More... | |
virtual bool | operator!= (const AbstractPositionIterator &rhs) const |
Difference operator. More... | |
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. More... | |
const std::vector< T > | operator* () const |
Returns a vector of the values in current position (column, row) from iterator. More... | |
void | operator++ () |
Advances to the next position. More... | |
void | operator-- () |
Returns to the previous position. More... | |
LineIterator & | operator= (const LineIterator &rhs) |
T | operator[] (const unsigned int i) const |
Returns the real value in current position (column, row, band) from iterator. More... | |
void | setEnd () |
Sets the iterator position to the end of the current band. More... | |
~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. More... | |
static LineIterator | end (const te::rst::Raster *r, const te::gm::Line *l) |
Returns an iterator referring to after the end of the iterator. More... | |
Protected Attributes | |
int | m_currentpixelindex |
The index of the current pixel location. More... | |
const te::gm::Line * | m_line |
The spatial restriction to be applied in the iterator. More... | |
double | m_operatorBrackets_value |
Used by the operator[] method. More... | |
std::complex< double > | m_operatorParenthesis_value |
Used by the operator() method. More... | |
std::vector< te::gm::Point * > | m_pixelsinline |
A vector of pixel locations that intersects the line. More... | |
const te::rst::Raster * | m_raster |
The band from where to get the values. More... | |
This class implements the strategy to iterate with spatial restriction, the iteration occurs inside a line.
Definition at line 252 of file PositionIterator.h.
te::rst::LineIterator< T >::LineIterator | ( | ) |
Definition at line 862 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 870 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::gm::Point::getX(), te::gm::Point::getY(), te::rst::Grid::gridToGeo(), te::gm::Geometry::intersection(), te::gm::INTERSECTS, te::rst::LineIterator< T >::m_line, te::rst::LineIterator< T >::m_pixelsinline, te::rst::AbstractPositionIterator< 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 933 of file PositionIterator.h.
te::rst::LineIterator< T >::~LineIterator | ( | ) |
Definition at line 940 of file PositionIterator.h.
|
static |
Returns an iterator referring to the first value of the band.
Definition at line 1018 of file PositionIterator.h.
|
static |
Returns an iterator referring to after the end of the iterator.
Definition at line 1023 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 978 of file PositionIterator.h.
|
virtual |
Returns the current row in iterator.
Implements te::rst::AbstractPositionIterator< T >.
Definition at line 973 of file PositionIterator.h.
|
virtualinherited |
Difference operator.
rhs | The right-hand side to compare. |
Definition at line 406 of file PositionIterator.h.
References te::rst::AbstractPositionIterator< T >::m_raster.
bool te::rst::LineIterator< T >::operator!= | ( | const LineIterator< T > & | rhs | ) | const |
Definition at line 1032 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 966 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 945 of file PositionIterator.h.
|
virtual |
Advances to the next position.
Implements te::rst::AbstractPositionIterator< T >.
Definition at line 983 of file PositionIterator.h.
|
virtual |
Returns to the previous position.
Implements te::rst::AbstractPositionIterator< T >.
Definition at line 991 of file PositionIterator.h.
te::rst::LineIterator< T > & te::rst::LineIterator< T >::operator= | ( | const LineIterator< T > & | rhs | ) |
Definition at line 999 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 959 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 1013 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 304 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 303 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 306 of file PositionIterator.h.
|
mutableprotected |
Used by the operator() method.
Definition at line 307 of file PositionIterator.h.
|
protected |
A vector of pixel locations that intersects the line.
Definition at line 305 of file PositionIterator.h.
Referenced by te::rst::LineIterator< T >::LineIterator(), and te::rst::LineIterator< T >::operator=().
|
protectedinherited |
The band from where to get the values.
Definition at line 145 of file PositionIterator.h.
Referenced by te::rst::LineIterator< T >::LineIterator(), te::rst::AbstractPositionIterator< T >::operator!=(), te::rst::AbstractPositionIterator< T >::operator=(), and te::rst::PointSetIterator< T >::PointSetIterator().