Class PolygonExtracter

java.lang.Object
org.locationtech.jts.geom.util.PolygonExtracter
All Implemented Interfaces:
GeometryFilter

public class PolygonExtracter extends Object implements GeometryFilter
Extracts all the Polygon elements from a Geometry.
Version:
1.7
See Also:
  • Field Details

    • comps

      private List comps
  • Constructor Details

    • PolygonExtracter

      public PolygonExtracter(List comps)
      Constructs a PolygonExtracterFilter with a list in which to store Polygons found.
  • Method Details

    • getPolygons

      public static List getPolygons(Geometry geom, List list)
      Extracts the Polygon elements from a single Geometry and adds them to the provided List.
      Parameters:
      geom - the geometry from which to extract
      list - the list to add the extracted elements to
    • getPolygons

      public static List getPolygons(Geometry geom)
      Extracts the Polygon elements from a single Geometry and returns them in a List.
      Parameters:
      geom - the geometry from which to extract
    • filter

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