| java.lang.Object com.vividsolutions.jump.geom.LineSegmentUtil
LineSegmentUtil | public class LineSegmentUtil (Code) | | Utility functions for
LineSegment s.
Note:
Eventually some of these functions may be moved into the JTS LineSegment class.
|
Method Summary | |
public static LineString | asGeometry(GeometryFactory factory, LineSegment seg) Converts a LineSegment to a LineString. | public static double | hausdorffDistance(LineSegment seg0, LineSegment seg1) Computes the Hausdorff distance between two LineSegments. | public static LineSegment | project(LineSegment tgt, LineSegment seg) Projects one line segment onto another and returns the resulting
line segment.
The returned line segment will be a subset of
the target line line segment. |
asGeometry | public static LineString asGeometry(GeometryFactory factory, LineSegment seg)(Code) | | Converts a LineSegment to a LineString.
Parameters: factory - a factory used to create the LineString Parameters: seg - the LineSegment to convert a new LineString based on the segment |
hausdorffDistance | public static double hausdorffDistance(LineSegment seg0, LineSegment seg1)(Code) | | Computes the Hausdorff distance between two LineSegments.
To compute the Hausdorff distance, it is sufficient to compute
the distance from one segment's endpoints to the other segment
and choose the maximum.
Parameters: seg0 - Parameters: seg1 - the Hausdorff distance between the segments |
project | public static LineSegment project(LineSegment tgt, LineSegment seg)(Code) | | Projects one line segment onto another and returns the resulting
line segment.
The returned line segment will be a subset of
the target line line segment. This subset may be null, if
the segments are oriented in such a way that there is no projection.
Parameters: tgt - the line segment to be projected onto Parameters: seg - the line segment to project the projected line segment, or null if there is no overlap |
|
|