com.vividsolutions.jump.algorithm
Class LengthSubstring
java.lang.Object
com.vividsolutions.jump.algorithm.LengthSubstring
public class LengthSubstring
- extends java.lang.Object
Computes a substring of a LineString
between given distances along the line.
- The distances are clipped to the actual line length
- If the start distance is equal to the end distance,
a zero-length line with two identical points is returned
- FUTURE: If the start distance is greater than the end distance,
an inverted section of the line is returned
FUTURE: should handle startLength > endLength, and flip the returned
linestring. Also should handle negative lengths (they are measured from end
of line backwards).
|
Constructor Summary |
LengthSubstring(com.vividsolutions.jts.geom.LineString line)
|
|
Method Summary |
com.vividsolutions.jts.geom.LineString |
getSubstring(double startDistance,
double endDistance)
|
static com.vividsolutions.jts.geom.LineString |
getSubstring(com.vividsolutions.jts.geom.LineString line,
double startLength,
double endLength)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LengthSubstring
public LengthSubstring(com.vividsolutions.jts.geom.LineString line)
getSubstring
public static com.vividsolutions.jts.geom.LineString getSubstring(com.vividsolutions.jts.geom.LineString line,
double startLength,
double endLength)
getSubstring
public com.vividsolutions.jts.geom.LineString getSubstring(double startDistance,
double endDistance)