Class GeometryExtracter

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

public class GeometryExtracter extends Object implements GeometryFilter
Extracts the components of a given type from a Geometry.
Version:
1.7
  • Constructor Details

    • GeometryExtracter

      public GeometryExtracter(Class clz, List comps)
      Deprecated.
      Constructs a filter with a list in which to store the elements found.
      Parameters:
      clz - the class of the components to extract (null means all types)
      comps - the list to extract into
    • GeometryExtracter

      public GeometryExtracter(String geometryType, List comps)
      Constructs a filter with a list in which to store the elements found.
      Parameters:
      geometryType - Geometry type to extract (null means all types)
      comps - the list to extract into
  • Method Details

    • extract

      public static List extract(Geometry geom, Class clz, List list)
      Extracts the components of type clz from a 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
    • extract

      public static List extract(Geometry geom, String geometryType, List list)
      Extracts the components of geometryType from a Geometry and adds them to the provided List.
      Parameters:
      geom - the geometry from which to extract
      geometryType - Geometry type to extract (null means all types)
      list - the list to add the extracted elements to
    • extract

      public static List extract(Geometry geom, Class clz)
      Deprecated.
      Extracts the components of type clz from a Geometry and returns them in a List.
      Parameters:
      geom - the geometry from which to extract
    • extract

      public static List extract(Geometry geom, String geometryType)
    • isOfType

      protected static boolean isOfType(Geometry geom, String geometryType)
    • 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.