Class InputExtracter

Hierarchy: Object , InputExtracter
All Implemented Interfaces: GeometryFilter
class InputExtracter
implements GeometryFilter
Extracts atomic elements from input geometries or collections, recording the dimension found. Empty geometries are discarded since they do not contribute to the result of UnaryUnionOp.
Authors:
Martin Davis
public InputExtracter()
public static InputExtracter extract(Collection<Geometry> geoms)
Extracts elements from a collection of geometries.
Parameters:
geoms - geoms a collection of geometries
Returns:
an extracter over the geometries
public static InputExtracter extract(Geometry geom)
Extracts elements from a geometry.
Parameters:
geoms - geoms a geometry to extract from
Returns:
an extracter over the geometry
public boolean isEmpty()
Tests whether there were any non-empty geometries extracted.
Returns:
true if there is a non-empty geometry present
public int getDimension()
Gets the maximum dimension extracted.
Returns:
the maximum extracted dimension
public GeometryFactory getFactory()
Gets the geometry factory from the extracted geometry, if there is one. If an empty collection was extracted, will return null.
Returns:
a geometry factory, or null if one could not be determined
public List getExtract(int dim)
Gets the extracted atomic geometries of the given dimension dim.
Parameters:
dim - dim the dimension of geometry to return
Returns:
a list of the extracted geometries of dimension dim.
public void filter(Geometry geom)