public abstract class Geometry<P extends Position> extends Object implements Serializable
Geometry
s.Modifier | Constructor and Description |
---|---|
protected |
Geometry(CoordinateReferenceSystem<P> crs)
Creates an empty Geometry
|
protected |
Geometry(PositionSequence<P> positions,
CoordinateReferenceSystem<P> crs) |
Modifier and Type | Method and Description |
---|---|
abstract void |
accept(GeometryVisitor<P> visitor)
Accepts a
GeometryVisitor . |
boolean |
equals(Object o) |
static <Q extends Position> |
forceToCrs(Geometry<?> geometry,
CoordinateReferenceSystem<Q> crs)
Creates a new
Geometry with the positions from the specified geometry and having the specified
CoordinateReferenceSystem |
int |
getCoordinateDimension()
Returns the coordinate dimension of this
Geometry
|
CoordinateReferenceSystem<P> |
getCoordinateReferenceSystem()
Returns the coordinate reference system of this
Geometry |
protected static <T extends Position> |
getCrs(Geometry<T>[] geometries) |
abstract int |
getDimension()
Returns the topological dimension of this instance.
|
Envelope<P> |
getEnvelope()
Returns the
Envelope of this instance. |
abstract GeometryType |
getGeometryType()
Returns the type of this
Geometry . |
int |
getNumPositions()
Returns the number of positions in the
PositionSequence of this Geometry . |
Class<P> |
getPositionClass() |
P |
getPositionN(int index)
Returns the position at the specified index in the
PositionSequence of this Geometry . |
PositionSequence<P> |
getPositions()
Returns the
PositionSequence of this instance |
int |
getSRID()
Returns the numeric identifier of the coordinate reference system of this
Geometry . |
int |
hashCode() |
boolean |
isEmpty()
Tests whether this
Geometry corresponds to the empty set. |
protected static <T extends Position> |
nestPositionSequences(Geometry<T>[] geometries) |
String |
toString()
Returns the Well-Known Text (WKT) representation of this
Geometry . |
protected Object |
writeReplace() |
protected Geometry(CoordinateReferenceSystem<P> crs)
crs
- the CoordinateReferenceSystem to useprotected Geometry(PositionSequence<P> positions, CoordinateReferenceSystem<P> crs)
public static <Q extends Position> Geometry<Q> forceToCrs(Geometry<?> geometry, CoordinateReferenceSystem<Q> crs)
Geometry
with the positions from the specified geometry and having the specified
CoordinateReferenceSystem
Q
- the Position
type for the returned Geometrygeometry
- source Geometry
that supplies the Position
s for the returned Geometry
crs
- the CoordinateReferenceSystem
for the returned Geometry
Geometry
with the positions of the specified geometry and having
the specified CoordinateReferenceSystem
protected static <T extends Position> PositionSequence<T> nestPositionSequences(Geometry<T>[] geometries)
protected static <T extends Position> CoordinateReferenceSystem<T> getCrs(Geometry<T>[] geometries)
public int getCoordinateDimension()
Geometry
The coordinate dimension is the number of components in the coordinates of the points in
this Geometry
.
public CoordinateReferenceSystem<P> getCoordinateReferenceSystem()
Geometry
Geometry
public int getSRID()
Geometry
.
A SRID is usually interpreted as meaning the EPSG-code for the coordinate reference system. In this implementation, this is not enforced.
Geometry
.public boolean isEmpty()
Geometry
corresponds to the empty set.Geometry
corresponds to the empty set, false otherwise.public int getNumPositions()
PositionSequence
of this Geometry
.PositionSequence
of this Geometry
.public P getPositionN(int index)
PositionSequence
of this Geometry
.index
- the position in the PositionSequence
(first point is at index 0).PositionSequence
of this Geometry
.public PositionSequence<P> getPositions()
PositionSequence
of this instancePositionSequence
of this instancepublic Envelope<P> getEnvelope()
Envelope
of this instance.Envelope
of this instance.public abstract GeometryType getGeometryType()
Geometry
.GeometryType
of this instance.public String toString()
Geometry
.public abstract int getDimension()
Geometries
.public abstract void accept(GeometryVisitor<P> visitor)
GeometryVisitor
.
If this Geometry
instance is a GeometryCollection
then it will pass the
visitor to its contained Geometries
.
visitor
- protected Object writeReplace() throws ObjectStreamException
ObjectStreamException
Copyright © 2024 geolatte.org. All rights reserved.