| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- Namespace List
- Namespace Members

Enumerations | Functions | Variables
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

enum TeBUFFERREGION::TeBufferType

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:

  coord | the location of the point
  bufferDistance | the desired distance in the same unit as coord
  numPoints | the number of points that should be used to describe the buffer zone (a circle in this case)
  pol | to 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:

  coord | the location of the point
  bufferDistance | the desired distance in the same unit as coord
  numPoints | the number of points that should be used to describe the buffer zone (a circle in this case)
  bufferLevels | the number of buffer intervals
  bufferPols | to 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:

  pointSetIn | the object point set
  bufferDistance | the desired distance in the same unit as points coordinates
  numPoints | the number of points that should be used to describe the curved corners of the buffer zone
  bufferLevels | the number of buffer intervals
  polyVecOut | to 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:

  lineSetIn | the object line set
  bufferDistance | the desired distance in the same unit as lines coordinates
  numPoints | the number of points that should be used to describe the curved corners of the buffer zone
  bufferLevels | the number of buffer intervals
  polyVecOut | to 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:

  cellSetIn | the object cell set
  bufferDistance | the desired distance in the same unit as cells coordinates
  numPoints | the number of points that should be used to describe the curved corners of the buffer zone
  bufferLevels | the number of buffer intervals
  bufferType | the buffer type: inside/outside/inside+outside
  polyVecOut | to 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:

  line | the line
  bufferDistance | the desired distance in the same unit as line coordinates
  numPoints | the number of points that should be used to describe the curved corners of the buffer zone
  ps | to 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:

  line | the line
  bufferDistance | the desired distance in the same unit as line coordinates
  numPoints | the number of points that should be used to describe the curved corners of the buffer zone
  bufferLevels | the number of buffer intervals
  polVec | to 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:

  pol | the polygon
  bufferDistance | the desired distance in the same unit as polygon rings coordinates
  numPoints | the number of points that should be used to describe the curved corners of the buffer zone
  ps | to 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:

  pol | the polygon
  bufferDistance | the desired distance in the same unit as polygon rings coordinates
  numPoints | the number of points that should be used to describe the curved corners of the buffer zone
  bufferLevels | the number of buffer intervals
  buffType | the buffer type: inside/outside/inside+outside
  polsVec | to 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:

  polSetIn | the object polygon set
  bufferDistance | the desired distance in the same unit as polygon rings coordinates
  numPoints | the number of points that should be used to describe the curved corners of the buffer zone
  bufferLevels | the number of buffer intervals
  bufferType | the buffer type: inside/outside/inside+outside
  polyVecOut | to 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:

  first | primeiro ponto que define o segmento de reta.
  last | segundo ponto que define o segmento de reta.
  bufferDistance | distancia utilizada para tracar o buffer.
  numPoints | numero de pontos utilizado na definicao da semi-circunferencia ao redor dos vertices.
  bufferLevels | numero de niveis do buffer.
  bufferPols | linhas 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:

  first | primeiro ponto que define o segmento de reta: a rotina pode inverter seu conteudo com o parametro "last"
  last | segundo ponto que define o segmento de reta: a rotina pode inverter seu conteudo com o parametro "first"
  ang | angulo que define uma linha perpendicular ao segmento passando pela coordenada first
  didswap | indica 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:

  first | primeiro ponto que define o segmento de reta.
  last | segundo ponto que define o segmento de reta.
  bufferDistance | distancia utilizada para tracar o buffer.
  numPoints | numero de pontos utilizado na definicao da semi-circunferencia ao redor dos vertices.
  bufferLevels | numero de niveis do buffer.
  bufferPols | linhas 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:

  pol | poligono para a qual os buffers serao tracados.
  bufferDistance | distancia utilizada para tracar o buffer.
  numPoints | numero de pontos utilizados para construcao dos semi-circulos de cada segmento.
  bufferLevels | numero de niveis do buffer.
  polsVec | vetor 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:

  line | linha para a qual os buffers serao tracados.
  bufferDistance | distancia utilizada para tracar o buffer.
  numPoints | numero de pontos utilizados para construcao dos semi-circulos de cada segmento.
  bufferLevels | numero de niveis do buffer.
  polVec | vetor 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:

  pol | poligono para a qual os buffers serao tracados.
  bufferDistance | distancia utilizada para tracar o buffer.
  numPoints | numero de pontos utilizados para construcao dos semi-circulos de cada segmento.
  bufferLevels | numero de niveis do buffer.
  polsVec | vetor 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