|
||||||||||
| 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 deegree's 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)
Geometry
is not automatically a compliant SFS geometry. isSFSCompliant() can be used to check if this is the case, it
returns true for the following subtypes / configurations:
PointLineStringPolygon (with LinearRing boundaries)MultiPointMultiLineStringMultiPolygon (if the members are SFS-compliant)MultiGeometry (if the members are SFS-compliant)SFSProfiler can be used to simplify it into an SFS 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(org.deegree.commons.uom.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. |
ICRS |
getCoordinateSystem()
Returns the associated spatial reference system. |
Geometry |
getDifference(Geometry geometry)
Returns the set-theoretic difference of this and the passed Geometry. |
org.deegree.commons.uom.Measure |
getDistance(Geometry geometry,
org.deegree.commons.uom.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,
org.deegree.commons.uom.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 |
isSFSCompliant()
Returns whether this geometry complies with the Simple Feature Specification (SFS). |
boolean |
isWithin(Geometry geometry)
tests whether the value of a geometric is topological located within this geometry. |
boolean |
isWithinDistance(Geometry geometry,
org.deegree.commons.uom.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(ICRS crs)
Sets the associated spatial reference system. |
void |
setGMLProperties(org.deegree.commons.tom.gml.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.commons.tom.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 org.deegree.commons.tom.Objectvoid 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 setICRS getCoordinateSystem()
void setCoordinateSystem(ICRS crs)
crs - spatial reference system, may be nullvoid setGMLProperties(org.deegree.commons.tom.gml.GMLStdProps props)
gml:name).
props - properties to be attachedboolean isSFSCompliant()
true, if this geometry complies with the SFS, false otherwiseint getCoordinateDimension()
boolean contains(Geometry geometry)
geometry - the Geometry to test this Geometry against
Geometry contains geometryboolean crosses(Geometry geometry)
geometry - the Geometry to test this Geometry against
Geometry crosses geometryboolean equals(Geometry geometry)
geometry - the Geometry to test this Geometry against
Geometry is equal to geometryboolean intersects(Geometry geometry)
geometry - the Geometry to test this Geometry against
Geometry intersects geometry
boolean isBeyond(Geometry geometry,
org.deegree.commons.uom.Measure distance)
geometry - second geometrydistance -
distanceboolean isDisjoint(Geometry geometry)
geometry - the Geometry to test this Geometry against
Geometry is disjoint from geometryboolean isWithin(Geometry geometry)
contains(Geometry) method
geometry -
boolean isWithinDistance(Geometry geometry,
org.deegree.commons.uom.Measure distance)
geometry - second geometrydistance -
distanceboolean overlaps(Geometry geometry)
geometry - the Geometry to test this Geometry against
Geometry overlaps geometryboolean touches(Geometry geometry)
geometry - the Geometry to test this Geometry against
Geometry touches geometryGeometry getBuffer(org.deegree.commons.uom.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()
org.deegree.commons.uom.Measure getDistance(Geometry geometry,
org.deegree.commons.uom.Unit requestedUnits)
geometry - second geometryrequestedUnits - unit of the
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||