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)
Constructs a filter with a list in which to store the elements found.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.List
extract(Geometry geom, java.lang.Class clz)
Extracts the components of type clz from aGeometry
and returns them in aList
.static java.util.List
extract(Geometry geom, java.lang.Class clz, java.util.List list)
Extracts the components of type clz from aGeometry
and adds them to the providedList
.void
filter(Geometry geom)
Performs an operation with or ongeom
.
-
-
-
Method Detail
-
extract
public static java.util.List extract(Geometry geom, java.lang.Class clz, java.util.List list)
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.Class clz)
Extracts the components of type clz from aGeometry
and returns them in aList
.- Parameters:
geom
- the geometry from which to extract
-
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.
-
-