TerraLib 4.1
TeRaster::iteratorPoly Class Reference

A raster iterator with a restriction of area. More...

#include <TeRaster.h>

Inheritance diagram for TeRaster::iteratorPoly:
TeRaster::iterator

List of all members.

Public Member Functions

 iteratorPoly (int colCurr, int linCurr, int nc, int nl, int nb, TeRaster *pt, const TePolygon &poly, TeStrategicIterator str, double linMin=0.0, double linMax=0.0, double colMin=0.0, double colMax=0.0, TeCoordPairVect seg=TeCoordPairVect(), int posSeg=0, int nlInPoly=0, int nColsInPoly=0, bool e=true, double minLinCM=0.0, int band=0)
 Constructor.
 iteratorPoly (TeRaster *raster=0)
 empty contructor
virtual ~iteratorPoly ()
 destructor
void moveForward ()
 Move iterator forward.
iteratorPolyoperator++ ()
 Prefix move forward operator.
iteratorPoly operator++ (int)
 Prefix move orward operator.
double operator* ()
 Dereferencing operator.
double operator* (int band)
 Returns the value of a given band of the element pointed by the iterator.
bool getProperty (TeProperty &prop)
 Returns the value of of the element pointed by the iterator as TeProperty structure.
bool end ()
 Returns the last past one element in the polygon.
int nLinesInPoly ()
 Returns the number of lines covered by the iterator.
int nColsInPoly ()
 Returns the number of columns covered by the iterator.

Detailed Description

A raster iterator with a restriction of area.

A structure that allows to cover the raster elements (pixels) that are IN or OUT a specific region (polygon)


Constructor & Destructor Documentation

TeRaster::iteratorPoly::iteratorPoly ( int  colCurr,
int  linCurr,
int  nc,
int  nl,
int  nb,
TeRaster pt,
const TePolygon poly,
TeStrategicIterator  str,
double  linMin = 0.0,
double  linMax = 0.0,
double  colMin = 0.0,
double  colMax = 0.0,
TeCoordPairVect  seg = TeCoordPairVect(),
int  posSeg = 0,
int  nlInPoly = 0,
int  nColsInPoly = 0,
bool  e = true,
double  minLinCM = 0.0,
int  band = 0 
) [inline]

Constructor.

Parameters:
colCurrinitial column
linCurrinitial line
ncnumber of columns
nlnumber of lines
nbnumber of bands
ptpointer to the raster that will be covered
polypolygon that defines a specific region
strstrategic of the iterator, IN or OUT the polygon
linMinminimal line of the raster that will be covered
linMaxmaximal line of the raster that will be covered
colMinminimal column of the raster that will be covered
colMaxmaximal column of the raster that will be covered
segthe segments of intersection of the current line
posSegthe current segment
nlInPolynumber of lines IN the polygon
nColsInPolynumber of columns IN the polygon
eiterator end
minLinCMminimal line (in world coordinates)
bandband to iterate
TeRaster::iteratorPoly::iteratorPoly ( TeRaster raster = 0) [inline]

empty contructor

virtual TeRaster::iteratorPoly::~iteratorPoly ( ) [inline, virtual]

destructor


Member Function Documentation

bool TeRaster::iteratorPoly::end ( void  ) [inline]

Returns the last past one element in the polygon.

bool TeRaster::iteratorPoly::getProperty ( TeProperty prop)

Returns the value of of the element pointed by the iterator as TeProperty structure.

If there is a band restriction defined it will return the value associated to that band. Otherwise will return the value associated to band 0.

void TeRaster::iteratorPoly::moveForward ( ) [virtual]

Move iterator forward.

Reimplemented from TeRaster::iterator.

int TeRaster::iteratorPoly::nColsInPoly ( ) [inline]

Returns the number of columns covered by the iterator.

int TeRaster::iteratorPoly::nLinesInPoly ( ) [inline]

Returns the number of lines covered by the iterator.

double TeRaster::iteratorPoly::operator* ( int  band)

Returns the value of a given band of the element pointed by the iterator.

Reimplemented from TeRaster::iterator.

double TeRaster::iteratorPoly::operator* ( )

Dereferencing operator.

This operator was designed for compatibility reasons with standard containers of STL. If there is a band restriction defined it will return the value associated to that band. Otherwise will return the value associated to band 0.

Reimplemented from TeRaster::iterator.

TeRaster::iteratorPoly & TeRaster::iteratorPoly::operator++ ( )

Prefix move forward operator.

Reimplemented from TeRaster::iterator.

TeRaster::iteratorPoly TeRaster::iteratorPoly::operator++ ( int  )

Prefix move orward operator.

Reimplemented from TeRaster::iterator.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines