Class ComponentCoordinateExtracter

java.lang.Object
org.locationtech.jts.geom.util.ComponentCoordinateExtracter
All Implemented Interfaces:
GeometryComponentFilter

public class ComponentCoordinateExtracter extends Object implements GeometryComponentFilter
Extracts a representative Coordinate from each connected component of a Geometry.
Version:
1.9
  • Constructor Details

    • ComponentCoordinateExtracter

      public ComponentCoordinateExtracter(List coords)
      Constructs a LineExtracterFilter with a list in which to store LineStrings found.
  • Method Details

    • getCoordinates

      public static List getCoordinates(Geometry geom)
      Extracts a representative Coordinate from each connected component in a geometry.

      If more than one geometry is to be processed, it is more efficient to create a single ComponentCoordinateExtracter instance and pass it to each geometry.

      Parameters:
      geom - the Geometry from which to extract
      Returns:
      a list of representative Coordinates
    • filter

      public void filter(Geometry geom)
      Description copied from interface: GeometryComponentFilter
      Performs an operation with or on geom.
      Specified by:
      filter in interface GeometryComponentFilter
      Parameters:
      geom - a Geometry to which the filter is applied.