|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Geometry
Base interface for all vector geometry types.
Root of the ISO 19107/GML 3.1.1/GML 3.2.1 compliant geometry type hierarchy. All geometries inherit methods for the
common topological predicates (e.g. intersects(Geometry)
and touches(Geometry)
as well as the usual
geometry creation methods (e.g getIntersection(Geometry)
and getBuffer(Measure)
).
contains(Geometry)
crosses(Geometry)
equals(Geometry)
intersects(Geometry)
isDisjoint(Geometry)
isWithin(Geometry)
isWithinDistance(Geometry,Measure)
touches(Geometry)
getBuffer(Measure)
getCentroid()
getConvexHull()
getDifference(Geometry)
getEnvelope()
getIntersection(Geometry)
getUnion(Geometry)
gml:name
elements or
gml:description
) which are inherited by any GML geometry type definition are treated in a specific way.
They are modelled using the GMLStdProps
class. This design decision has been driven by the goal to
make the implementation less GML (and GML-version) specific and to allow for example to export a Geometry
instance as either GML 2, GML 3.1 or GML 3.2 (different namespaces and types for the standard properties).
Nested Class Summary | |
---|---|
static class |
Geometry.GeometryType
Convenience enum type for discriminating the different geometry variants. |
Method Summary | |
---|---|
boolean |
contains(Geometry geometry)
Tests whether this geometry contains the specified geometry. |
boolean |
crosses(Geometry geometry)
Tests whether this geometry crosses the specified geometry. |
boolean |
equals(Geometry geometry)
Tests whether this geometry is equal to the specified geometry. |
Geometry |
getBuffer(Measure distance)
Return a new Geometry that contains all points with a distance from this Geometry that is less than or
equal to the specified distance. |
Point |
getCentroid()
Returns the centroid of the geometry. |
Geometry |
getConvexHull()
Returns the convex hull of the geometry. |
int |
getCoordinateDimension()
Returns the coordinate dimension, i.e. the dimension of the space that the geometry is embedded in. |
CRS |
getCoordinateSystem()
Returns the associated spatial reference system. |
Geometry |
getDifference(Geometry geometry)
Returns the set-theoretic difference of this and the passed Geometry . |
Measure |
getDistance(Geometry geometry,
Unit requestedUnits)
Returns the minimum distance between this and the specified geometry. |
Envelope |
getEnvelope()
Returns the minimal bounding box of the geometry. |
Geometry.GeometryType |
getGeometryType()
Returns the type of geometry. |
String |
getId()
Returns the id of the geometry. |
Geometry |
getIntersection(Geometry geometry)
Returns the set-theoretic intersection of this and the passed Geometry . |
PrecisionModel |
getPrecision()
Returns the PrecisionModel of the geometry. |
Geometry |
getUnion(Geometry geometry)
Returns the set-theoretic union of this and the passed Geometry . |
boolean |
intersects(Geometry geometry)
Tests whether this geometry intersects the specified geometry. |
boolean |
isBeyond(Geometry geometry,
Measure distance)
Tests whether this geometry is beyond a specified distance of a second geometry. |
boolean |
isDisjoint(Geometry geometry)
Tests whether this geometry is disjoint from the specified geometry. |
boolean |
isWithin(Geometry geometry)
tests whether the value of a geometric is topological located within this geometry. |
boolean |
isWithinDistance(Geometry geometry,
Measure distance)
Tests whether this geometry is within a specified distance of a second geometry. |
boolean |
overlaps(Geometry geometry)
Tests whether this geometry overlaps the specified geometry. |
void |
setCoordinateSystem(CRS crs)
Sets the associated spatial reference system. |
void |
setGMLProperties(GMLStdProps props)
Sets the attached properties (e.g. |
void |
setId(String id)
Sets the id of the geometry. |
void |
setPrecision(PrecisionModel pm)
Sets the PrecisionModel of the geometry. |
boolean |
touches(Geometry geometry)
Tests whether this geometry touches the specified geometry. |
Methods inherited from interface org.deegree.gml.GMLObject |
---|
getGMLProperties |
Method Detail |
---|
Geometry.GeometryType getGeometryType()
String getId()
In a GML representation of the geometry, this corresponds to the gml:id
(GML 3 and later) or
gid
(GML 2) attribute of the geometry element.
getId
in interface GMLObject
void setId(String id)
id
- id of the geometryPrecisionModel getPrecision()
PrecisionModel
of the geometry.
void setPrecision(PrecisionModel pm)
PrecisionModel
of the geometry.
pm
- the precision model to setCRS getCoordinateSystem()
void setCoordinateSystem(CRS crs)
crs
- spatial reference system, may be nullvoid setGMLProperties(GMLStdProps props)
gml:name
).
props
- properties to be attachedint getCoordinateDimension()
boolean contains(Geometry geometry)
geometry
- the Geometry
to test this Geometry
against
Geometry
contains geometry
boolean crosses(Geometry geometry)
geometry
- the Geometry
to test this Geometry
against
Geometry
crosses geometry
boolean equals(Geometry geometry)
geometry
- the Geometry
to test this Geometry
against
Geometry
is equal to geometry
boolean intersects(Geometry geometry)
geometry
- the Geometry
to test this Geometry
against
Geometry
intersects geometry
boolean isBeyond(Geometry geometry, Measure distance)
geometry
- second geometrydistance
-
distance
boolean isDisjoint(Geometry geometry)
geometry
- the Geometry
to test this Geometry
against
Geometry
is disjoint from geometry
boolean isWithin(Geometry geometry)
contains(Geometry)
method
geometry
-
boolean isWithinDistance(Geometry geometry, Measure distance)
geometry
- second geometrydistance
-
distance
boolean overlaps(Geometry geometry)
geometry
- the Geometry
to test this Geometry
against
Geometry
overlaps geometry
boolean touches(Geometry geometry)
geometry
- the Geometry
to test this Geometry
against
Geometry
touches geometry
Geometry getBuffer(Measure distance)
Geometry
that contains all points with a distance from this Geometry that is less than or
equal to the specified distance.
distance
-
Point getCentroid()
Point
that is the centroid of this geometryEnvelope getEnvelope()
Geometry getDifference(Geometry geometry)
Geometry
.
geometry
- other geometry, must not be null
null
(empty set)Geometry getIntersection(Geometry geometry)
Geometry
.
geometry
- other geometry, must not be null
null
(empty set)Geometry getUnion(Geometry geometry)
Geometry
.
geometry
- other geometry, must not be null
Geometry getConvexHull()
Measure getDistance(Geometry geometry, Unit requestedUnits)
geometry
- second geometryrequestedUnits
- unit of the
|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |