Package org.locationtech.jts.noding
Class SegmentStringUtil
- java.lang.Object
-
- org.locationtech.jts.noding.SegmentStringUtil
-
public class SegmentStringUtil extends java.lang.Object
Utility methods for processingSegmentString
s.- Author:
- Martin Davis
-
-
Constructor Summary
Constructors Constructor Description SegmentStringUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List
extractNodedSegmentStrings(Geometry geom)
Extracts all linear components from a givenGeometry
toSegmentString
s.static java.util.List
extractSegmentStrings(Geometry geom)
Extracts all linear components from a givenGeometry
toSegmentString
s.static Geometry
toGeometry(java.util.Collection segStrings, GeometryFactory geomFact)
Converts a collection ofSegmentString
s into aGeometry
.static java.lang.String
toString(java.util.List segStrings)
-
-
-
Method Detail
-
extractSegmentStrings
public static java.util.List extractSegmentStrings(Geometry geom)
Extracts all linear components from a givenGeometry
toSegmentString
s. 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 java.util.List extractNodedSegmentStrings(Geometry geom)
Extracts all linear components from a givenGeometry
toSegmentString
s. 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(java.util.Collection segStrings, GeometryFactory geomFact)
Converts a collection ofSegmentString
s into aGeometry
. The geometry will be either aLineString
or aMultiLineString
(possibly empty).- Parameters:
segStrings
- a collection of SegmentStrings- Returns:
- a LineString or MultiLineString
-
toString
public static java.lang.String toString(java.util.List segStrings)
-
-