Package org.locationtech.jts.geom.util
Class GeometryExtracter
- java.lang.Object
-
- org.locationtech.jts.geom.util.GeometryExtracter
-
- All Implemented Interfaces:
GeometryFilter
public class GeometryExtracter extends java.lang.Object implements GeometryFilter
Extracts the components of a given type from aGeometry
.- Version:
- 1.7
-
-
Constructor Summary
Constructors Constructor Description GeometryExtracter(java.lang.Class clz, java.util.List comps)
Deprecated.GeometryExtracter(java.lang.String geometryType, java.util.List comps)
Constructs a filter with a list in which to store the elements found.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.util.List
extract(Geometry geom, java.lang.Class clz)
Deprecated.static java.util.List
extract(Geometry geom, java.lang.Class clz, java.util.List list)
Deprecated.static java.util.List
extract(Geometry geom, java.lang.String geometryType)
static java.util.List
extract(Geometry geom, java.lang.String geometryType, java.util.List list)
Extracts the components of geometryType from aGeometry
and adds them to the providedList
.void
filter(Geometry geom)
Performs an operation with or ongeom
.
-
-
-
Constructor Detail
-
GeometryExtracter
public GeometryExtracter(java.lang.Class clz, java.util.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(java.lang.String geometryType, java.util.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 Detail
-
extract
public static java.util.List extract(Geometry geom, java.lang.Class clz, java.util.List list)
Deprecated.Extracts the components of type clz from aGeometry
and adds them to the providedList
.- Parameters:
geom
- the geometry from which to extractlist
- the list to add the extracted elements to
-
extract
public static java.util.List extract(Geometry geom, java.lang.String geometryType, java.util.List list)
Extracts the components of geometryType from aGeometry
and adds them to the providedList
.- Parameters:
geom
- the geometry from which to extractgeometryType
- Geometry type to extract (null means all types)list
- the list to add the extracted elements to
-
extract
public static java.util.List extract(Geometry geom, java.lang.Class clz)
Deprecated.Extracts the components of type clz from aGeometry
and returns them in aList
.- Parameters:
geom
- the geometry from which to extract
-
extract
public static java.util.List extract(Geometry geom, java.lang.String geometryType)
-
filter
public void filter(Geometry geom)
Description copied from interface:GeometryFilter
Performs an operation with or ongeom
.- Specified by:
filter
in interfaceGeometryFilter
- Parameters:
geom
- aGeometry
to which the filter is applied.
-
-