public class GeometryCollection extends Geometry implements Iterable<Geometry>
Geometry
that is an ordered collection of some number of Geometry
s.
All elements in a GeometryCollection
must be in the same CoordinateReferenceSystem
,
which is also the CoordinateReferenceSystem
for the GeometryCollection
.
Modifier and Type | Field and Description |
---|---|
protected Geometry[] |
geometries |
protected PointCollection |
points |
Constructor and Description |
---|
GeometryCollection(Geometry[] geometries)
Constructs a
GeometryCollection from the specified Geometry s. |
Modifier and Type | Method and Description |
---|---|
void |
accept(GeometryVisitor visitor)
Accepts the
GeometryVisitor , and
will pass it to it's constituent Geometries . |
static GeometryCollection |
createEmpty()
Constructs an empty
GeometryCollection . |
int |
getDimension()
Returns the topological dimension of this instance.
|
Geometry |
getGeometryN(int num)
Returns the
Geometry element at the specified (zero-based) position in this GeometryCollection . |
GeometryType |
getGeometryType()
Returns the type of this
Geometry . |
int |
getNumGeometries()
Returns the number of elements in this
GeometryCollection . |
PointCollection |
getPoints()
Returns the
PointCollection that is associated with this instance |
Iterator<Geometry> |
iterator()
Creates an
Iterator over the elements of this GeometryCollection . |
asBinary, asText, buffer, collectPointSets, contains, convexHull, crosses, difference, disjoint, distance, equals, getBoundary, getCoordinateDimension, getCrsId, getCrsId, getDimensionalFlag, getEnvelope, getGeometryOperations, getGeometryOperations, getNumPoints, getPointN, getSRID, hashCode, intersection, intersects, is3D, isEmpty, isMeasured, isSimple, locateAlong, locateBetween, overlaps, relate, symDifference, toString, touches, union, within
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
protected final Geometry[] geometries
protected final PointCollection points
public GeometryCollection(Geometry[] geometries)
GeometryCollection
from the specified Geometry
s.geometries
- the Geometry
s that are the elements of the constructed GeometryCollection
.public static GeometryCollection createEmpty()
GeometryCollection
.GeometryCollection
that is empty.public int getNumGeometries()
GeometryCollection
.public Geometry getGeometryN(int num)
Geometry
element at the specified (zero-based) position in this GeometryCollection
.num
- the position in the collection of the requested Geometry
Geometry
at the position specified by the num parameter.public int getDimension()
Geometry
Geometries
.getDimension
in class Geometry
public GeometryType getGeometryType()
Geometry
Geometry
.getGeometryType
in class Geometry
GeometryType
of this instance.public PointCollection getPoints()
Geometry
PointCollection
that is associated with this instancepublic Iterator<Geometry> iterator()
Iterator
over the elements of this GeometryCollection
.public void accept(GeometryVisitor visitor)
GeometryVisitor
, and
will pass it to it's constituent Geometries
.Copyright © 2015 geolatte.org. All rights reserved.