com.vividsolutions.jts.linearref
Class LengthLocationMap
java.lang.Object
com.vividsolutions.jts.linearref.LengthLocationMap
public class LengthLocationMap
extends java.lang.Object
Computes the
LinearLocation
for a given length
along a linear
Geometry
.
Negative lengths are measured in reverse from end of the linear geometry.
Out-of-range values are clamped.
LengthLocationMap
public LengthLocationMap(Geometry linearGeom)
getLocation
public static LinearLocation getLocation(Geometry linearGeom,
double length)
length
- the length index of the location
getLocation
public LinearLocation getLocation(double length)
Compute the
LinearLocation
corresponding to a length.
Negative lengths are measured in reverse from end of the linear geometry.
Out-of-range values are clamped.
length
- the length index
- the corresponding LinearLocation