Class GeometryCollection

Hierarchy: Object , Geometry, GeometryCollection
All Implemented Interfaces: Cloneable , Comparable , Serializable
Direct Known Subclasses: MultiLineString, MultiPoint, MultiPolygon
public class GeometryCollection
extends Geometry
Models a collection of Geometrys of arbitrary type and dimension.

Other

  • version: 1.7
public GeometryCollection(Geometry[] geometries, PrecisionModel precisionModel, int SRID)
Deprecation:
Use GeometryFactory instead
public GeometryCollection(Geometry[] geometries, GeometryFactory factory)
Parameters:
geometries - geometries the Geometrys for this GeometryCollection, or null or an empty array to create the empty geometry. Elements may be empty Geometrys, but not nulls.
public Coordinate getCoordinate()
public Coordinate[] getCoordinates()
Collects all coordinates of all subgeometries into an Array. Note that while changes to the coordinate objects themselves may modify the Geometries in place, the returned Array as such is only a temporary container which is not synchronized back.
Returns:
the collected coordinates
public boolean isEmpty()
public int getDimension()
public int getBoundaryDimension()
public int getNumGeometries()
public Geometry getGeometryN(int n)
public int getNumPoints()
public String getGeometryType()
public Geometry getBoundary()
public double getArea()
Returns the area of this GeometryCollection
Returns:
the area of the polygon
public double getLength()
public boolean equalsExact(Geometry other, double tolerance)
public void apply(CoordinateFilter filter)
public void apply(CoordinateSequenceFilter filter)
public void apply(GeometryFilter filter)
public void apply(GeometryComponentFilter filter)
public Object clone()
Creates and returns a full copy of this GeometryCollection object. (including all coordinates contained by it).
Returns:
a clone of this instance
protected GeometryCollection copyInternal()
public void normalize()
protected Envelope computeEnvelopeInternal()
protected int compareToSameClass(Object o)
protected int compareToSameClass(Object o, CoordinateSequenceComparator comp)
protected int getTypeCode()
public GeometryCollection reverse()
Creates a GeometryCollection with every component reversed. The order of the components in the collection are not reversed.
Returns:
a GeometryCollection in the reverse order
protected GeometryCollection reverseInternal()