| TerraLib 4.1

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

Functions
Relation test
Topological operators

## Functions

TL_DLL short | TeRelation (const TeCoord2D &c, const TeLine2D &l)
| Returns the relation between coordinate c and line l.
TL_DLL short | TeRelation (const TeCoord2D &c, const TeLinearRing &r)
| Point in polygon inside/outside/boundary code.
TL_DLL short | TeRelation (const TeCoord2D &c, const TePolygon &pol)
| Coordinate in polygon inside/outside/boundary code.
TL_DLL short | TeRelation (const TePoint &p, const TePolygon &pol)
| Point in polygon inside/outside/boundary code.
TL_DLL short | TeRelation (const TeCoord2D &c, const TePolygonSet &pSet)
| Point in polygon set inside/outside/boundary code.
TL_DLL short | TeRelation (const TeLine2D &lRed, const TeLine2D &lBlue, const short &relation)
| This function returns the relation between two lines.
TL_DLL short | TeRelation (const TeLine2D &line, const TePolygon &pol)
| This function returns the relation between a line and a polygon.
TL_DLL short | TeRelation (const TePolygon &pRed, const TePolygon &pBlue)
| This function returns the relation between two polygons.

## Detailed Description

Return the relation between two objects.

## Function Documentation

TL_DLL short TeRelation | ( | const TeCoord2D & | c,
|  | const TeLine2D & | l
| ) |  |

Returns the relation between coordinate c and line l.

Parameters:

  c | The coordinate.
  l | The line.

Returns:
  one of the relations: INSIDE, OUTSIDE or BOUNDARY.

Note:
  It doesn't do box elimination, just uses from TeIsOnLine(coordinate, line) elimination

TL_DLL short TeRelation | ( | const TePolygon & | pRed,
|  | const TePolygon & | pBlue
| ) |  |

This function returns the relation between two polygons.

Parameters:

  pRed | The first polygon.
  pBlue | The second polygon.

Returns:
  one of the relations: TeEQUALS, TeDISJOINT, TeTOUCHES, TeWITHIN (pRed IS WITHIN pBlue), TeCONTANS (pBlue CONTAINS pRed), TeOVERLAPS, TeCOVEREDBY (pRed IS COVERED BY pBlue) or TeCOVERS (pRed COVERS pBlue).

Note:
  Doesn't do box elimination. You must implement the test in your own functions.

TL_DLL short TeRelation | ( | const TeLine2D & | line,
|  | const TePolygon & | pol
| ) |  |

This function returns the relation between a line and a polygon.

Parameters:

  line | The line.
  pol | The polygon.

Returns:
  one of the relations: TeDISJOINT, TeTOUCHES, TeWITHIN (THE LINE IS WITHIN), TeCROSSES, TeCOVEREDBY (THE LINE IS COVERED BY).

Note:
  Doesn't do box elimination. You must implement the test in your own functions.

TL_DLL short TeRelation | ( | const TeLine2D & | lRed,
|  | const TeLine2D & | lBlue,
|  | const short & | relation
| ) |  |

This function returns the relation between two lines.

Parameters:

  lRed | The first line.
  lBlue | The second line.
  relation | To return the relation that stop the search: TeDISJOINT, TeTOUCHES, TeWITHIN, TeCONTAINS, TeCROSSES, TeOVERLAPS, TeCOVEREDBY, TeCOVERS, TeEQUALS

Note:
  Doesn't do box elimination. You must implement the test in your own functions.

TL_DLL short TeRelation | ( | const TeCoord2D & | c,
|  | const TePolygonSet & | pSet
| ) |  |

Point in polygon set inside/outside/boundary code.

Parameters:

  c | The coordinate to test.
  pSet | The polygon set to test.

Returns:
  one of the relations: INSIDE, OUTSIDE or BOUNDARY.

Note:
  Does box elimination.

TL_DLL short TeRelation | ( | const TePoint & | p,
|  | const TePolygon & | pol
| ) |  |

Point in polygon inside/outside/boundary code.

Parameters:

  p | The coordinate to test.
  pol | The polygon to test.

Returns:
  one of the relations: INSIDE, OUTSIDE or BOUNDARY.

Note:
  It doesn't do box elimination, just uses from TeRelation(coordinate, line) elimination

TL_DLL short TeRelation | ( | const TeCoord2D & | c,
|  | const TePolygon & | pol
| ) |  |

Coordinate in polygon inside/outside/boundary code.

Parameters:

  c | The coordinate to test.
  pol | The polygon to test.

Returns:
  one of the relations: INSIDE, OUTSIDE or BOUNDARY.

Note:
  It doesn't do box elimination, just uses from TeRelation(coordinate, line) elimination

TL_DLL short TeRelation | ( | const TeCoord2D & | c,
|  | const TeLinearRing & | r
| ) |  |

Point in polygon inside/outside/boundary code.

Parameters:

  c | The coordinate to test.
  r | The simple polygon to test.

Returns:
  one of the relations: INSIDE, OUTSIDE or BOUNDARY.

Note:
  The ring is treated as a simple polygon (no holes). Does box elimination.

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines