|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vividsolutions.jts.geom.Geometry
com.vividsolutions.jts.geom.GeometryCollection
Basic implementation of GeometryCollection.
| Field Summary | |
protected Geometry[] |
geometries
Internal representation of this GeometryCollection. |
| Fields inherited from class com.vividsolutions.jts.geom.Geometry |
envelope, factory, SRID |
| Constructor Summary | |
GeometryCollection(Geometry[] geometries,
GeometryFactory factory)
|
|
GeometryCollection(Geometry[] geometries,
PrecisionModel precisionModel,
int SRID)
Deprecated. Use GeometryFactory instead |
|
| Method Summary | |
void |
apply(CoordinateFilter filter)
Performs an operation with or on this Geometry's
coordinates. |
void |
apply(CoordinateSequenceFilter filter)
Performs an operation on the coordinates in this Geometry's
CoordinateSequences. |
void |
apply(GeometryComponentFilter filter)
Performs an operation with or on this Geometry and its component Geometry's. |
void |
apply(GeometryFilter filter)
Performs an operation with or on this Geometry and its
subelement Geometrys (if any). |
java.lang.Object |
clone()
Creates and returns a full copy of this GeometryCollection object. |
protected int |
compareToSameClass(java.lang.Object o)
Returns whether this Geometry is greater than, equal to,
or less than another Geometry having the same class. |
protected int |
compareToSameClass(java.lang.Object o,
CoordinateSequenceComparator comp)
Returns whether this Geometry is greater than, equal to,
or less than another Geometry of the same class. |
protected Envelope |
computeEnvelopeInternal()
Returns the minimum and maximum x and y values in this Geometry
, or a null Envelope if this Geometry is empty. |
boolean |
equalsExact(Geometry other,
double tolerance)
Returns true if the two Geometrys are exactly equal,
up to a specified distance tolerance. |
double |
getArea()
Returns the area of this GeometryCollection |
Geometry |
getBoundary()
Returns the boundary, or an empty geometry of appropriate dimension if this Geometry is empty. |
int |
getBoundaryDimension()
Returns the dimension of this Geometrys inherent boundary. |
Coordinate |
getCoordinate()
Returns a vertex of this Geometry. |
Coordinate[] |
getCoordinates()
Collects all coordinates of all subgeometries into an Array. |
int |
getDimension()
Returns the dimension of this Geometry. |
Geometry |
getGeometryN(int n)
Returns an element Geometry from a GeometryCollection
(or this, if the geometry is not a collection). |
java.lang.String |
getGeometryType()
Returns the name of this object's com.vivid.jts.geom
interface. |
double |
getLength()
Returns the length of this Geometry. |
int |
getNumGeometries()
Returns the number of Geometrys in a GeometryCollection
(or 1, if the geometry is not a collection). |
int |
getNumPoints()
Returns the count of this Geometrys vertices. |
boolean |
isEmpty()
Returns whether or not the set of points in this Geometry is
empty. |
void |
normalize()
Converts this Geometry to normal form (or
canonical form ). |
| Methods inherited from class com.vividsolutions.jts.geom.Geometry |
buffer, buffer, buffer, checkNotGeometryCollection, compare, compareTo, compareTo, contains, convexHull, coveredBy, covers, crosses, difference, disjoint, distance, equal, equals, equalsExact, geometryChanged, geometryChangedAction, getCentroid, getEnvelope, getEnvelopeInternal, getFactory, getInteriorPoint, getPrecisionModel, getSRID, getUserData, hasNonEmptyElements, hasNullElements, intersection, intersects, isEquivalentClass, isRectangle, isSimple, isValid, isWithinDistance, overlaps, relate, relate, setSRID, setUserData, symDifference, toString, toText, touches, union, within |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected Geometry[] geometries
GeometryCollection.
| Constructor Detail |
public GeometryCollection(Geometry[] geometries,
PrecisionModel precisionModel,
int SRID)
public GeometryCollection(Geometry[] geometries,
GeometryFactory factory)
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.| Method Detail |
public Coordinate getCoordinate()
GeometryGeometry.
getCoordinate in class GeometryCoordinate which is a vertex of this Geometry.
Returns null if this Geometry is emptypublic Coordinate[] getCoordinates()
getCoordinates in class Geometrypublic boolean isEmpty()
GeometryGeometry is
empty.
isEmpty in class Geometrytrue if this Geometry equals the empty
geometrypublic int getDimension()
GeometryGeometry.
getDimension in class Geometrypublic int getBoundaryDimension()
GeometryGeometrys inherent boundary.
getBoundaryDimension in class GeometryDimension.FALSE if the boundary is the empty geometry.public int getNumGeometries()
GeometryGeometrys in a GeometryCollection
(or 1, if the geometry is not a collection).
getNumGeometries in class Geometrypublic Geometry getGeometryN(int n)
GeometryGeometry from a GeometryCollection
(or this, if the geometry is not a collection).
getGeometryN in class Geometryn - the index of the geometry element
public int getNumPoints()
GeometryGeometrys vertices. The Geometry
s contained by composite Geometrys must be
Geometry's; that is, they must implement getNumPoints
getNumPoints in class GeometryGeometrypublic java.lang.String getGeometryType()
Geometrycom.vivid.jts.geom
interface.
getGeometryType in class GeometryGeometrys most specific com.vividsolutions.jts.geom
interfacepublic Geometry getBoundary()
GeometryGeometry is empty.
(In the case of zero-dimensional geometries, '
an empty GeometryCollection is returned.)
For a discussion of this function, see the OpenGIS Simple
Features Specification. As stated in SFS Section 2.1.13.1, "the boundary
of a Geometry is a set of Geometries of the next lower dimension."
getBoundary in class GeometryGeometrypublic double getArea()
GeometryCollection
getArea in class Geometrypublic double getLength()
GeometryGeometry.
Linear geometries return their length.
Areal geometries return their perimeter.
They override this function to compute the area.
Others return 0.0
getLength in class Geometry
public boolean equalsExact(Geometry other,
double tolerance)
GeometryGeometrys are exactly equal,
up to a specified distance tolerance.
Two Geometries are exactly equal within a distance tolerance
if and only if:
Geometrys are
composites and any children are not Geometrys, returns
false.
equalsExact in class Geometryother - the Geometry with which to compare this Geometry
true if this and the other Geometry
are of the same class and have equal internal data.public void apply(CoordinateFilter filter)
GeometryGeometry's
coordinates.
If this method modifies any coordinate values,
#geometryChanged() must be called to update the geometry state.
Note that you cannot use this
method to
modify this Geometry if its underlying CoordinateSequence's #get method
returns a copy of the Coordinate, rather than the actual Coordinate stored
(if it even stores Coordinates at all).
apply in class Geometryfilter - the filter to apply to this Geometry's
coordinatespublic void apply(CoordinateSequenceFilter filter)
GeometryGeometry's
CoordinateSequences.
If this method modifies any coordinate values,
#geometryChanged() must be called to update the geometry state.
apply in class Geometryfilter - the filter to applypublic void apply(GeometryFilter filter)
GeometryGeometry and its
subelement Geometrys (if any).
Only GeometryCollections and subclasses
have subelement Geometry's.
apply in class Geometryfilter - the filter to apply to this Geometry (and
its children, if it is a GeometryCollection).public void apply(GeometryComponentFilter filter)
Geometry
apply in class Geometryfilter - the filter to apply to this Geometry.public java.lang.Object clone()
GeometryCollection object.
(including all coordinates contained by it).
clone in class Geometrypublic void normalize()
GeometryGeometry to normal form (or
canonical form ). Normal form is a unique representation for Geometry
s. It can be used to test whether two Geometrys are equal
in a way that is independent of the ordering of the coordinates within
them. Normal form equality is a stronger condition than topological
equality, but weaker than pointwise equality. The definitions for normal
form use the standard lexicographical ordering for coordinates. "Sorted in
order of coordinates" means the obvious extension of this ordering to
sequences of coordinates.
normalize in class Geometryprotected Envelope computeEnvelopeInternal()
GeometryGeometry
, or a null Envelope if this Geometry is empty.
Unlike getEnvelopeInternal, this method calculates the Envelope
each time it is called; getEnvelopeInternal caches the result
of this method.
computeEnvelopeInternal in class GeometryGeometrys bounding box; if the Geometry
is empty, Envelope#isNull will return trueprotected int compareToSameClass(java.lang.Object o)
GeometryGeometry is greater than, equal to,
or less than another Geometry having the same class.
compareToSameClass in class Geometryo - a Geometry having the same class as this Geometry
o, as
defined in "Normal Form For Geometry" in the JTS Technical
Specifications
protected int compareToSameClass(java.lang.Object o,
CoordinateSequenceComparator comp)
GeometryGeometry is greater than, equal to,
or less than another Geometry of the same class.
using the given CoordinateSequenceComparator.
compareToSameClass in class Geometryo - a Geometry having the same class as this Geometrycomp - a CoordinateSequenceComparator
o, as
defined in "Normal Form For Geometry" in the JTS Technical
Specifications
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||