Class SegmentStringUtil

java.lang.Object
org.locationtech.jts.noding.SegmentStringUtil

public class SegmentStringUtil extends Object
Utility methods for processing SegmentStrings.
  • Constructor Details

    • SegmentStringUtil

      public SegmentStringUtil()
  • Method Details

    • extractSegmentStrings

      public static List extractSegmentStrings(Geometry geom)
      Extracts all linear components from a given Geometry to SegmentStrings. 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 given Geometry to SegmentStrings. 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 of SegmentStrings into a Geometry. The geometry will be either a LineString or a MultiLineString (possibly empty).
      Parameters:
      segStrings - a collection of SegmentStrings
      Returns:
      a LineString or MultiLineString
    • toString

      public static String toString(List segStrings)