Class SegmentStringUtil
java.lang.Object
org.locationtech.jts.noding.SegmentStringUtil
Utility methods for processing
SegmentStrings.- Author:
- Martin Davis
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ListExtracts all linear components from a givenGeometrytoBasicSegmentStrings.static ListExtracts all linear components from a givenGeometrytoNodedSegmentStrings.static ListExtracts all linear components from a givenGeometrytoSegmentStrings.static GeometrytoGeometry(Collection segStrings, GeometryFactory geomFact) Converts a collection ofSegmentStrings into aGeometry.static String
-
Constructor Details
-
SegmentStringUtil
public SegmentStringUtil()
-
-
Method Details
-
extractSegmentStrings
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
Extracts all linear components from a givenGeometrytoNodedSegmentStrings. The SegmentString data item is set to be the source Geometry.- Parameters:
geom- the geometry to extract from- Returns:
- a List of NodedSegmentStrings
-
extractBasicSegmentStrings
Extracts all linear components from a givenGeometrytoBasicSegmentStrings. The SegmentString data item is set to be the source Geometry.- Parameters:
geom- the geometry to extract from- Returns:
- a List of BasicSegmentStrings
-
toGeometry
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
-
toString
-