|
GEOS
3.5.0
|
Computes the length index of the point on a linear Geometry nearest a given Coordinate. More...
#include <LengthIndexOfPoint.h>
Public Member Functions | |
| LengthIndexOfPoint (const geom::Geometry *linearGeom) | |
| double | indexOf (const geom::Coordinate &inputPt) const |
| double | indexOfAfter (const geom::Coordinate &inputPt, double minIndex) const |
| Finds the nearest index along the linear Geometry to a given Coordinate after the specified minimum index. More... | |
Static Public Member Functions | |
| static double | indexOf (const geom::Geometry *linearGeom, const geom::Coordinate &inputPt) |
| static double | indexOfAfter (const geom::Geometry *linearGeom, const geom::Coordinate &inputPt, double minIndex) |
Computes the length index of the point on a linear Geometry nearest a given Coordinate.
The nearest point is not necessarily unique; this class always computes the nearest point closest to the start of the geometry.
| double geos::linearref::LengthIndexOfPoint::indexOf | ( | const geom::Coordinate & | inputPt | ) | const |
Find the nearest location along a linear Geometry to a given point.
| inputPt | the coordinate to locate |
| double geos::linearref::LengthIndexOfPoint::indexOfAfter | ( | const geom::Coordinate & | inputPt, |
| double | minIndex | ||
| ) | const |
Finds the nearest index along the linear Geometry to a given Coordinate after the specified minimum index.
If possible the location returned will be strictly greater than the minLocation. If this is not possible, the value returned will equal minLocation. (An example where this is not possible is when minLocation = [end of line] ).
| inputPt | the coordinate to locate |
| minLocation | the minimum location for the point location |
1.8.11