TerraLib 4.1
TeBUFFERREGION Namespace Reference

Contains structures and definitions needed to execute Buffer Region operation. More...

Enumerations

enum  TeBufferType { TeINSIDEBUFFER, TeOUTSIDEBUFFER, TeINSIDEOUTSIDEBUFFER }
 Buffer type. More...

Functions

void TeFindInitialAng (TeCoord2D &first, TeCoord2D &last, double &ang, bool &didswap)
void TeElementarBuffer (TeCoord2D first, TeCoord2D last, const double &bufferDistance, const unsigned int &numPoints, const unsigned int &bufferLevels, vector< TePolygon > &bufferPols)
void TeFullElementarBuffer (TeCoord2D first, TeCoord2D last, const double &bufferDistance, const unsigned int &numPoints, const unsigned int &bufferLevels, vector< TePolygon > &bufferPols)
bool TeLineBuffer (const TeLine2D &line, const double &bufferDistance, const unsigned int &numPoints, const unsigned int &bufferLevels, vector< TePolygon > &polVec)
bool TeInsideBufferRegion (const TePolygon &pol, const double &bufferDistance, const unsigned int &numPoints, const unsigned int &bufferLevels, vector< TePolygonSet > &polsVec)
bool TeOutsideBufferRegion (const TePolygon &pol, const double &bufferDistance, const unsigned int &numPoints, const unsigned int &bufferLevels, vector< TePolygonSet > &polsVec)
bool TeInOutBufferRegion (const TePolygon &pol, const double &bufferDistance, const unsigned int &numPoints, const unsigned int &bufferLevels, vector< TePolygonSet > &polsVec)
TL_DLL bool TeBufferRegion (const TeCoord2D &coord, const double &bufferDistance, const unsigned int &numPoints, TePolygon &pol)
 Calculates a buffer region around a point (DEPRECATED: use TeBufferRegion with buffer levels instead).
TL_DLL bool TeBufferRegion (const TeCoord2D &coord, const double &bufferDistance, const unsigned int &numPoints, const unsigned int &bufferLevels, vector< TePolygon > &bufferPols)
 Calculates a buffer region around a point.
TL_DLL bool TeBufferRegion (const TeLine2D &line, const double &bufferDistance, const unsigned int &numPoints, TePolygonSet &ps)
 Calculates a buffer region around a line (DEPRECATED: use TeBufferRegion with buffer levels instead).
TL_DLL bool TeBufferRegion (const TeLine2D &line, const double &bufferDistance, const unsigned int &numPoints, const unsigned int &bufferLevels, vector< TePolygonSet > &polVec)
 Calculates a buffer region around a line.
TL_DLL bool TeBufferRegion (const TePolygon &pol, const double &bufferDistance, const unsigned int &numPoints, TePolygonSet &ps)
 Calculates a buffer region around a polygon (DEPRECATED: use TeBufferRegion with buffer levels instead).
TL_DLL bool TeBufferRegion (const TePolygon &pol, const double &bufferDistance, const unsigned int &numPoints, const unsigned int &bufferLevels, const TeBufferType &buffType, vector< TePolygonSet > &polsVec)
 Calculates a buffer region around a polygon (DEPRECATED: use TeBufferRegion with buffer levels instead).
TL_DLL bool TeBufferRegion (const TePolygonSet &polSetIn, const double &bufferDistance, const unsigned int &numPoints, const unsigned int &bufferLevels, const TeBufferType &bufferType, vector< TePolygonSet > &polyVecOut)
 Calculates a buffer region around an object polygon set.
TL_DLL bool TeBufferRegion (const TeLineSet &lineSetIn, const double &bufferDistance, const unsigned int &numPoints, const unsigned int &bufferLevels, vector< TePolygonSet > &polyVecOut)
 Calculates a buffer region around an object line set.
TL_DLL bool TeBufferRegion (const TePointSet &pointSetIn, const double &bufferDistance, const unsigned int &numPoints, const unsigned int &bufferLevels, vector< TePolygonSet > &polyVecOut)
 Calculates a buffer region around an object point set.
TL_DLL bool TeBufferRegion (const TeCellSet &cellSetIn, const double &bufferDistance, const unsigned int &numPoints, const unsigned int &bufferLevels, const TeBufferType &bufferType, vector< TePolygonSet > &polyVecOut)
 Calculates a buffer region around an object cell set.

Variables

const double bufferPI = 3.14159265358979323846
const double doubleBufferPI = 6.28318530717958647692
const double halfBufferPI = 1.57079632679489661923

Detailed Description

Contains structures and definitions needed to execute Buffer Region operation.


Enumeration Type Documentation

Buffer type.

  • TeINSIDEBUFFER used to make only inside buffer lines
  • TeOUTSIDEBUFFER used to make only outside buffer lines
  • TeINSIDEOUTSIDEBUFFER used to make inside and outside buffer lines
Enumerator:
TeINSIDEBUFFER 
TeOUTSIDEBUFFER 
TeINSIDEOUTSIDEBUFFER 

Function Documentation

bool TeBUFFERREGION::TeBufferRegion ( const TeCoord2D coord,
const double &  bufferDistance,
const unsigned int &  numPoints,
TePolygon pol 
)

Calculates a buffer region around a point (DEPRECATED: use TeBufferRegion with buffer levels instead).

Parameters:
coordthe location of the point
bufferDistancethe desired distance in the same unit as coord
numPointsthe number of points that should be used to describe the buffer zone (a circle in this case)
polto return the buffer zone: a circle polygon in clockwise order
Returns:
Returns true if operation succeed otherwise returns false.
bool TeBUFFERREGION::TeBufferRegion ( const TeCoord2D coord,
const double &  bufferDistance,
const unsigned int &  numPoints,
const unsigned int &  bufferLevels,
vector< TePolygon > &  bufferPols 
)

Calculates a buffer region around a point.

Parameters:
coordthe location of the point
bufferDistancethe desired distance in the same unit as coord
numPointsthe number of points that should be used to describe the buffer zone (a circle in this case)
bufferLevelsthe number of buffer intervals
bufferPolsto return the buffer intervals: a circle polygon in clockwise order with holes in counterclockwise order
Returns:
Returns true if operation succeed otherwise returns false.
bool TeBUFFERREGION::TeBufferRegion ( const TePointSet pointSetIn,
const double &  bufferDistance,
const unsigned int &  numPoints,
const unsigned int &  bufferLevels,
vector< TePolygonSet > &  polyVecOut 
)

Calculates a buffer region around an object point set.

Parameters:
pointSetInthe object point set
bufferDistancethe desired distance in the same unit as points coordinates
numPointsthe number of points that should be used to describe the curved corners of the buffer zone
bufferLevelsthe number of buffer intervals
polyVecOutto return the buffers of the object, each level in a position of the vector
Returns:
Returns true if operation succeed otherwise returns false.
bool TeBUFFERREGION::TeBufferRegion ( const TeLineSet lineSetIn,
const double &  bufferDistance,
const unsigned int &  numPoints,
const unsigned int &  bufferLevels,
vector< TePolygonSet > &  polyVecOut 
)

Calculates a buffer region around an object line set.

Parameters:
lineSetInthe object line set
bufferDistancethe desired distance in the same unit as lines coordinates
numPointsthe number of points that should be used to describe the curved corners of the buffer zone
bufferLevelsthe number of buffer intervals
polyVecOutto return the buffers of the object, each level in a position of the vector
Returns:
Returns true if operation succeed otherwise returns false.
bool TeBUFFERREGION::TeBufferRegion ( const TeCellSet cellSetIn,
const double &  bufferDistance,
const unsigned int &  numPoints,
const unsigned int &  bufferLevels,
const TeBufferType &  bufferType,
vector< TePolygonSet > &  polyVecOut 
)

Calculates a buffer region around an object cell set.

Parameters:
cellSetInthe object cell set
bufferDistancethe desired distance in the same unit as cells coordinates
numPointsthe number of points that should be used to describe the curved corners of the buffer zone
bufferLevelsthe number of buffer intervals
bufferTypethe buffer type: inside/outside/inside+outside
polyVecOutto return the buffers of the object, each level in a position of the vector
Returns:
Returns true if operation succeed otherwise returns false.
bool TeBUFFERREGION::TeBufferRegion ( const TeLine2D line,
const double &  bufferDistance,
const unsigned int &  numPoints,
TePolygonSet ps 
)

Calculates a buffer region around a line (DEPRECATED: use TeBufferRegion with buffer levels instead).

Parameters:
linethe line
bufferDistancethe desired distance in the same unit as line coordinates
numPointsthe number of points that should be used to describe the curved corners of the buffer zone
psto return the buffer zone: a set of polygons
Returns:
Returns true if operation succeed otherwise returns false.
bool TeBUFFERREGION::TeBufferRegion ( const TeLine2D line,
const double &  bufferDistance,
const unsigned int &  numPoints,
const unsigned int &  bufferLevels,
vector< TePolygonSet > &  polVec 
)

Calculates a buffer region around a line.

Parameters:
linethe line
bufferDistancethe desired distance in the same unit as line coordinates
numPointsthe number of points that should be used to describe the curved corners of the buffer zone
bufferLevelsthe number of buffer intervals
polVecto return the buffer zone: a vector of polygons
Returns:
Returns true if operation succeed otherwise returns false.
bool TeBUFFERREGION::TeBufferRegion ( const TePolygon pol,
const double &  bufferDistance,
const unsigned int &  numPoints,
TePolygonSet ps 
)

Calculates a buffer region around a polygon (DEPRECATED: use TeBufferRegion with buffer levels instead).

Parameters:
polthe polygon
bufferDistancethe desired distance in the same unit as polygon rings coordinates
numPointsthe number of points that should be used to describe the curved corners of the buffer zone
psto return the buffer zone: a set of polygons
Returns:
Returns true if operation succeed otherwise returns false.
bool TeBUFFERREGION::TeBufferRegion ( const TePolygon pol,
const double &  bufferDistance,
const unsigned int &  numPoints,
const unsigned int &  bufferLevels,
const TeBufferType &  buffType,
vector< TePolygonSet > &  polsVec 
)

Calculates a buffer region around a polygon (DEPRECATED: use TeBufferRegion with buffer levels instead).

Parameters:
polthe polygon
bufferDistancethe desired distance in the same unit as polygon rings coordinates
numPointsthe number of points that should be used to describe the curved corners of the buffer zone
bufferLevelsthe number of buffer intervals
buffTypethe buffer type: inside/outside/inside+outside
polsVecto return the buffer zone: a vector of polygon set
Returns:
Returns true if operation succeed otherwise returns false.
bool TeBUFFERREGION::TeBufferRegion ( const TePolygonSet polSetIn,
const double &  bufferDistance,
const unsigned int &  numPoints,
const unsigned int &  bufferLevels,
const TeBufferType &  bufferType,
vector< TePolygonSet > &  polyVecOut 
)

Calculates a buffer region around an object polygon set.

Parameters:
polSetInthe object polygon set
bufferDistancethe desired distance in the same unit as polygon rings coordinates
numPointsthe number of points that should be used to describe the curved corners of the buffer zone
bufferLevelsthe number of buffer intervals
bufferTypethe buffer type: inside/outside/inside+outside
polyVecOutto return the buffers of the object, each level in a position of the vector
Returns:
Returns true if operation succeed otherwise returns false.
void TeBUFFERREGION::TeElementarBuffer ( TeCoord2D  first,
TeCoord2D  last,
const double &  bufferDistance,
const unsigned int &  numPoints,
const unsigned int &  bufferLevels,
vector< TePolygon > &  bufferPols 
) [inline]

Rotina auxiliar que traca um buffer elementar ao redor de um segmento, arredondando apenas um dos cantos do segmento: a linha do buffer tera orientacao horaria.

Parameters:
firstprimeiro ponto que define o segmento de reta.
lastsegundo ponto que define o segmento de reta.
bufferDistancedistancia utilizada para tracar o buffer.
numPointsnumero de pontos utilizado na definicao da semi-circunferencia ao redor dos vertices.
bufferLevelsnumero de niveis do buffer.
bufferPolslinhas no sentido horario que definem a linha de buffer de cada nivel.
void TeBUFFERREGION::TeFindInitialAng ( TeCoord2D first,
TeCoord2D last,
double &  ang,
bool &  didswap 
) [inline]

Rotina auxiliar que define o angulo inicial utilizado para tracar o buffer ao redor de um segmento de reta (rotina de uso interno - nao deve ser utilizada diretamente).

Parameters:
firstprimeiro ponto que define o segmento de reta: a rotina pode inverter seu conteudo com o parametro "last"
lastsegundo ponto que define o segmento de reta: a rotina pode inverter seu conteudo com o parametro "first"
angangulo que define uma linha perpendicular ao segmento passando pela coordenada first
didswapindica se as coordenadas first e last foram trocadas (se foi realizado o swap delas)
Note:
As coordenadas first e last devem ser necessariamente diferentes.
void TeBUFFERREGION::TeFullElementarBuffer ( TeCoord2D  first,
TeCoord2D  last,
const double &  bufferDistance,
const unsigned int &  numPoints,
const unsigned int &  bufferLevels,
vector< TePolygon > &  bufferPols 
) [inline]

Rotina auxiliar que traca um buffer elementar ao redor de um segmento, arredondando os dois cantos do segmento: a linha do buffer tera orientacao horaria.

Parameters:
firstprimeiro ponto que define o segmento de reta.
lastsegundo ponto que define o segmento de reta.
bufferDistancedistancia utilizada para tracar o buffer.
numPointsnumero de pontos utilizado na definicao da semi-circunferencia ao redor dos vertices.
bufferLevelsnumero de niveis do buffer.
bufferPolslinhas no sentido horario que definem a linha de buffer de cada nivel.
bool TeBUFFERREGION::TeInOutBufferRegion ( const TePolygon pol,
const double &  bufferDistance,
const unsigned int &  numPoints,
const unsigned int &  bufferLevels,
vector< TePolygonSet > &  polsVec 
) [inline]
bool TeBUFFERREGION::TeInsideBufferRegion ( const TePolygon pol,
const double &  bufferDistance,
const unsigned int &  numPoints,
const unsigned int &  bufferLevels,
vector< TePolygonSet > &  polsVec 
) [inline]

Rotina auxiliar que traca um buffer interno (negativo) no interior de um poligono, tracando varios niveis independentemente um do outro: para cada nivel de buffer, o anel externo do poligono estara no sentido horario e os buracos estarao no sentido anti-horario.

Parameters:
polpoligono para a qual os buffers serao tracados.
bufferDistancedistancia utilizada para tracar o buffer.
numPointsnumero de pontos utilizados para construcao dos semi-circulos de cada segmento.
bufferLevelsnumero de niveis do buffer.
polsVecvetor de saida com os poligonos de buffer de cada nivel: jah aninhados, isto e, os poligonos do nivel "n" jah consideram os do nivel "n-1".
bool TeBUFFERREGION::TeLineBuffer ( const TeLine2D line,
const double &  bufferDistance,
const unsigned int &  numPoints,
const unsigned int &  bufferLevels,
vector< TePolygon > &  polVec 
) [inline]

Rotina auxiliar que traca um buffer ao redor de uma linha, tracando varios niveis independentemente um do outro: para cada nivel de buffer, o anel externo do poligono estara no sentido horario e os buracos estarao no sentido anti-horario.

Parameters:
linelinha para a qual os buffers serao tracados.
bufferDistancedistancia utilizada para tracar o buffer.
numPointsnumero de pontos utilizados para construcao dos semi-circulos de cada segmento.
bufferLevelsnumero de niveis do buffer.
polVecvetor de saida com os poligonos de buffer de cada nivel: nao aninhados, isto e, possivelmente estao sobrepostos, sendo o ratamento dado em outras rotinas de mais alto nivel (que utilizam esta como suporte).
bool TeBUFFERREGION::TeOutsideBufferRegion ( const TePolygon pol,
const double &  bufferDistance,
const unsigned int &  numPoints,
const unsigned int &  bufferLevels,
vector< TePolygonSet > &  polsVec 
) [inline]

Rotina auxiliar que traca um buffer externo (positivo) ao redor de um poligono, tracando varios niveis independentemente um do outro: para cada nivel de buffer, o anel externo do poligono estara no sentido horario e os buracos estarao no sentido anti-horario.

Parameters:
polpoligono para a qual os buffers serao tracados.
bufferDistancedistancia utilizada para tracar o buffer.
numPointsnumero de pontos utilizados para construcao dos semi-circulos de cada segmento.
bufferLevelsnumero de niveis do buffer.
polsVecvetor de saida com os poligonos de buffer de cada nivel: jah aninhados, isto e, os poligonos do nivel "n" jah consideram os do nivel "n-1".

Variable Documentation

const double TeBUFFERREGION::bufferPI = 3.14159265358979323846
const double TeBUFFERREGION::doubleBufferPI = 6.28318530717958647692
const double TeBUFFERREGION::halfBufferPI = 1.57079632679489661923
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines