TerraLib 4.1
Functions that finds the localization of objects.

## Functions

TL_DLL bool TePointInPoly (const TeCoord2D &c, const TeLinearRing &r)
Point in polygon inside/outside/boundary code.
TL_DLL bool TeIsOnSegment (const TeCoord2D &c, const TeCoord2D &c1, const TeCoord2D &c2)
Check if coordinate c is on segment (segment is closed).
TL_DLL bool TeIsOnLine (const TeCoord2D &c, const TeLine2D &l)
Check if coordinate c is on line boundary or on line interior (see explanation above for definition of boundary and interior of a line).
TL_DLL bool TeLocateLineSegment (TeCoord2D &pin, TeLine2D &line, int &segment, double tol=0.0)
Locate the nearest line segment of a coordinate.

## Detailed Description

Functions that finds the localization of objects.

## Function Documentation

 TL_DLL bool TeIsOnLine ( const TeCoord2D & c, const TeLine2D & l )

Check if coordinate c is on line boundary or on line interior (see explanation above for definition of boundary and interior of a line).

Parameters:
 c The coordinate to be tested. l The line used in the test.

Obs: Do box elimination.

 TL_DLL bool TeIsOnSegment ( const TeCoord2D & c, const TeCoord2D & c1, const TeCoord2D & c2 )

Check if coordinate c is on segment (segment is closed).

Parameters:
 c The coordinate to be tested. c1 The first segment's coordinate. c2 The second segment's coordinate.
 TL_DLL bool TeLocateLineSegment ( TeCoord2D & pin, TeLine2D & line, int & segment, double tol = `0.0` )

Locate the nearest line segment of a coordinate.

Parameters:
 pin The coordinate. line The line. segment The position of the segment in the line tol Tolerance.
 TL_DLL bool TePointInPoly ( 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.
Note:
Check if point is INSIDE of a given ring. The ring is treated as a simple polygon (no holes). Adapted from: Samosky, Joseph, "SectionView: A system for interactively specifying and visualizing sections through three-dimensional medical image data, M.S. Thesis, Department of Electrical Engineering and Computer Science, Massachusetts Institute of Technology, 1993. Obs: Doesn't do box elimination.