TerraLib 4.1
Relation test

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:
cThe coordinate.
lThe 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:
pRedThe first polygon.
pBlueThe 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:
lineThe line.
polThe 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:
lRedThe first line.
lBlueThe second line.
relationTo 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:
cThe coordinate to test.
pSetThe 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:
pThe coordinate to test.
polThe 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:
cThe coordinate to test.
polThe 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:
cThe coordinate to test.
rThe 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