com.vividsolutions.jcs.conflate.roads
Class LineStringMatcher
java.lang.Object
com.vividsolutions.jcs.conflate.roads.LineStringMatcher
- public class LineStringMatcher
- extends java.lang.Object
|
Method Summary |
static com.vividsolutions.jts.geom.LineSegment |
directionLineSegment(com.vividsolutions.jts.geom.LineString line)
|
static boolean |
isApproximatelyStraight(com.vividsolutions.jts.geom.LineString line)
Computes whether a LineString is "approximately straight". |
static boolean |
isOrientationCompatible(com.vividsolutions.jts.geom.LineString line0,
com.vividsolutions.jts.geom.LineString line1)
Computes whether two linestrings are "orientation compatible". |
static double |
lengthDifferencePercent(com.vividsolutions.jts.geom.LineString line0,
com.vividsolutions.jts.geom.LineString line1)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
STRAIGHT_WIDTH_PERCENT
public static final double STRAIGHT_WIDTH_PERCENT
- See Also:
- Constant Field Values
MAX_ANGLE_DIFF
public static final double MAX_ANGLE_DIFF
- See Also:
- Constant Field Values
LineStringMatcher
public LineStringMatcher()
isApproximatelyStraight
public static boolean isApproximatelyStraight(com.vividsolutions.jts.geom.LineString line)
- Computes whether a LineString is "approximately straight".
This is the case if the line has a width of less than STRAIGHT_WIDTH_PERCENT
percentage of it's length
- Parameters:
line -
- Returns:
true if the linestring is approximately straight
directionLineSegment
public static com.vividsolutions.jts.geom.LineSegment directionLineSegment(com.vividsolutions.jts.geom.LineString line)
lengthDifferencePercent
public static double lengthDifferencePercent(com.vividsolutions.jts.geom.LineString line0,
com.vividsolutions.jts.geom.LineString line1)
isOrientationCompatible
public static boolean isOrientationCompatible(com.vividsolutions.jts.geom.LineString line0,
com.vividsolutions.jts.geom.LineString line1)
- Computes whether two linestrings are "orientation compatible".
This is the case if they have a relative
angle of less than 60 degrees.
- Parameters:
line0 - line1 -
- Returns: