public abstract class AbstractGeometryCollection<P extends Position,G extends Geometry<P>> extends Geometry<P> implements Complex<P,G>
Geometry that is an ordered collection of some number of Geometrys.
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<P>[] |
geometries |
| Constructor and Description |
|---|
AbstractGeometryCollection(CoordinateReferenceSystem<P> crs)
Constructs an empty
GeometryCollection |
AbstractGeometryCollection(G... geometries)
Constructs a
GeometryCollection from the specified Geometrys. |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(GeometryVisitor<P> visitor)
Accepts the
GeometryVisitor, and
will pass it to it's constituent Geometries. |
G[] |
components()
Returns the components
|
Class<? extends Geometry> |
getComponentType()
Returns the
Class of which all constituent Geometrys are instances. |
int |
getDimension()
Returns the topological dimension of this instance.
|
G |
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. |
Iterator<G> |
iterator()
Creates an
Iterator over the elements of this GeometryCollection. |
as, checkCast, equals, forceToCrs, forceToCrs, getBoundingBox, getCoordinateDimension, getCoordinateReferenceSystem, getCrs, getEnvelope, getNumPositions, getPositionClass, getPositionN, getPositions, getSRID, hashCode, hasM, hasZ, isEmpty, nestPositionSequences, toCrs, toString, writeReplaceclone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliterator@SafeVarargs public AbstractGeometryCollection(G... geometries)
GeometryCollection from the specified Geometrys.geometries - the Geometrys that are the elements of the constructed GeometryCollection.public AbstractGeometryCollection(CoordinateReferenceSystem<P> crs)
GeometryCollectionpublic int getNumGeometries()
GeometryCollection.public Class<? extends Geometry> getComponentType()
ComplexClass of which all constituent Geometrys are instances.public G[] components()
public G getGeometryN(int num)
Geometry element at the specified (zero-based) position in this GeometryCollection.num - the position in the collection of the requested GeometryGeometry at the position specified by the num parameter.public int getDimension()
GeometryGeometries.getDimension in class Geometry<P extends Position>public GeometryType getGeometryType()
GeometryGeometry.getGeometryType in class Geometry<P extends Position>GeometryType of this instance.public Iterator<G> iterator()
Iterator over the elements of this GeometryCollection.Copyright © 2023 geolatte.org. All rights reserved.