Package org.locationtech.jts.noding
Class SegmentStringUtil
- java.lang.Object
-
- org.locationtech.jts.noding.SegmentStringUtil
-
public class SegmentStringUtil extends Object
Utility methods for processingSegmentStrings.- Author:
- Martin Davis
-
-
Constructor Summary
Constructors Constructor Description SegmentStringUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ListextractNodedSegmentStrings(Geometry geom)Extracts all linear components from a givenGeometrytoSegmentStrings.static ListextractSegmentStrings(Geometry geom)Extracts all linear components from a givenGeometrytoSegmentStrings.static GeometrytoGeometry(Collection segStrings, GeometryFactory geomFact)Converts a collection ofSegmentStrings into aGeometry.static StringtoString(List segStrings)
-
-
-
Method Detail
-
extractSegmentStrings
public static List extractSegmentStrings(Geometry geom)
Extracts all linear components from a givenGeometrytoSegmentStrings. The SegmentString data item is set to be the source Geometry.- Parameters:
geom- the geometry to extract from- Returns:
- a List of SegmentStrings
-
extractNodedSegmentStrings
public static List extractNodedSegmentStrings(Geometry geom)
Extracts all linear components from a givenGeometrytoSegmentStrings. The SegmentString data item is set to be the source Geometry.- Parameters:
geom- the geometry to extract from- Returns:
- a List of SegmentStrings
-
toGeometry
public static Geometry toGeometry(Collection segStrings, GeometryFactory geomFact)
Converts a collection ofSegmentStrings into aGeometry. The geometry will be either aLineStringor aMultiLineString(possibly empty).- Parameters:
segStrings- a collection of SegmentStrings- Returns:
- a LineString or MultiLineString
-
-