public class LocationOfPoint extends Object
LineStringLocation of the point on a LineString
nearest a given point. The nearest point is not necessarily unique, but this
class always computes the nearest point closest to the start of the
linestring.| Constructor and Description |
|---|
LocationOfPoint(LineString line) |
| Modifier and Type | Method and Description |
|---|---|
static LineStringLocation |
locate(LineString line,
Point inputPt) |
LineStringLocation |
locate(Point inputPt)
Find the nearest location along a
LineString to a given point. |
LineStringLocation |
locateAfter(Point inputPt,
LineStringLocation minLocation)
Find the nearest location along a
LineString to a given point after
the specified minimum LineStringLocation. |
static double |
segmentFraction(Point p0,
Point p1,
Point inputPt) |
static double |
segmentFraction(Segment segment,
Point inputPt) |
public LocationOfPoint(LineString line)
public static LineStringLocation locate(LineString line, Point inputPt)
public LineStringLocation locate(Point inputPt)
LineString to a given point.inputPt - the coordinate to locatepublic LineStringLocation locateAfter(Point inputPt, LineStringLocation minLocation)
LineString to a given point after
the specified minimum LineStringLocation. 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 locateminLocation - the minimum location for the point locationCopyright © 2015 Revolution Systems Inc.. All rights reserved.