com.vividsolutions.jump.algorithm
Class LengthSubstring

java.lang.Object
  extended by com.vividsolutions.jump.algorithm.LengthSubstring

public class LengthSubstring
extends java.lang.Object

Computes a substring of a LineString between given distances along the line.

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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LengthSubstring

public LengthSubstring(com.vividsolutions.jts.geom.LineString line)
Method Detail

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)