Class LengthLocationMap

Hierarchy: Object , LengthLocationMap
public class LengthLocationMap
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.
public LengthLocationMap(Geometry linearGeom)
public static LinearLocation getLocation(Geometry linearGeom, double length)
Computes the LinearLocation for a given length along a linear Geometry.
Parameters:
linearGeom - linearGeom the linear geometry to use
length - length the length index of the location
Returns:
the LinearLocation for the length
public static LinearLocation getLocation(Geometry linearGeom, double length, boolean resolveLower)
Computes the LinearLocation for a given length along a linear Geometry, with control over how the location is resolved at component endpoints.
Parameters:
linearGeom - linearGeom the linear geometry to use
length - length the length index of the location
resolveLower - resolveLower if true lengths are resolved to the lowest possible index
Returns:
the LinearLocation for the length
public static double getLength(Geometry linearGeom, LinearLocation loc)
Computes the length for a given LinearLocation on a linear Geometry.
Parameters:
linearGeom - linearGeom the linear geometry to use
loc - loc the LinearLocation index of the location
Returns:
the length for the LinearLocation
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. Ambiguous indexes are resolved to the lowest possible location value.
Parameters:
length - length the length index
Returns:
the corresponding LinearLocation
public LinearLocation getLocation(double length, boolean resolveLower)
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. Ambiguous indexes are resolved to the lowest or highest possible location value, depending on the value of resolveLower
Parameters:
length - length the length index
Returns:
the corresponding LinearLocation
public double getLength(LinearLocation loc)