org.deegree.model.spatialschema
Interface Geometry
- All Superinterfaces:
- Serializable
- All Known Subinterfaces:
- Aggregate, Boundary, Complex, ComplexBoundary, Composite, CompositeCurve, CompositePoint, CompositeSolid, CompositeSurface, Curve, CurveBoundary, MultiCurve, MultiPoint, MultiPrimitive, MultiSolid, MultiSurface, OrientableCurve, OrientablePrimitive, OrientableSurface, Point, Primitive, PrimitiveBoundary, Ring, Shell, Solid, SolidBoundary, Surface, SurfaceBoundary
- All Known Implementing Classes:
- AggregateImpl, BoundaryImpl, CurveBoundaryImpl, CurveImpl, GeometryImpl, MultiCurveImpl, MultiPointImpl, MultiPrimitiveImpl, MultiSurfaceImpl, OrientableCurveImpl, OrientablePrimitiveImpl, OrientableSurfaceImpl, PointImpl, PrimitiveBoundaryImpl, PrimitiveImpl, RingImpl, SurfaceBoundaryImpl, SurfaceImpl
public interface Geometry
- extends Serializable
The basic interface for all geometries. it declares the methods that
are common to all geometries. this doesn't means for example that all
geometries defines a valid boundary but is there asked for they should
be able to answer (with null).
-----------------------------------------------------
- Version:
- $Revision: 6259 $ $Date: 2007-03-20 10:15:15 +0100 (Di, 20 Mär 2007) $
- Author:
- Andreas Poth
Method Summary |
boolean |
contains(Geometry gmo)
The Boolean valued operation "contains" shall return TRUE if this Geometry
contains another Geometry. |
boolean |
contains(Position position)
The Boolean valued operation "contains" shall return TRUE if this Geometry
contains a single point given by a coordinate. |
Geometry |
difference(Geometry gmo)
The "difference" operation shall return the set theoretic difference of
this Geometry and the passed Geometry. |
double |
distance(Geometry gmo)
The operation "distance" shall return the distance between this Geometry
and another Geometry. |
Boundary |
getBoundary()
returns the boundary of a geometry |
Geometry |
getBuffer(double distance)
The operation "buffer" shall return a Geometry containing all points whose
distance from this Geometry is less than or equal to the "distance" passed
as a parameter. |
Point |
getCentroid()
The operation "centroid" shall return the mathematical centroid for this
Geometry. |
Geometry |
getConvexHull()
The operation "convexHull" shall return a Geometry that represents the
convex hull of this Geometry. |
int |
getCoordinateDimension()
The operation "coordinateDimension" shall return the dimension of the
coordinates that define this Geometry, which must be the same as the
coordinate dimension of the coordinate reference system for this Geometry. |
CoordinateSystem |
getCoordinateSystem()
returns the spatial reference system of a geometry |
int |
getDimension()
The operation "dimension" shall return the inherent dimension of this
Geometry, which shall be less than or equal to the coordinate dimension. |
Envelope |
getEnvelope()
returns the bounding box of a geometry |
double |
getTolerance()
returns the tolerance value use for topological operations |
Geometry |
intersection(Geometry gmo)
The "intersection" operation shall return the set theoretic intersection
of this Geometry and the passed Geometry. |
boolean |
intersects(Geometry gmo)
The Boolean valued operation "intersects" shall return TRUE if this Geometry
intersects another Geometry. |
boolean |
isEmpty()
returns true if no geometry values resp. points stored
within the geometry. |
boolean |
isWithinDistance(Geometry gmo,
double distance)
provide optimized proximity queries within for a distance . |
void |
setTolerance(double tolerance)
sets tolerance value use for topological operations |
void |
translate(double[] d)
translate a geometry by the submitted values. if the length
of d is smaller then the dimension of the geometry
only the first d.length'th coordinates will be translated. |
Geometry |
union(Geometry gmo)
The "union" operation shall return the set theoretic union of this Geometry
and the passed Geometry. |
getEnvelope
Envelope getEnvelope()
- returns the bounding box of a geometry
getBoundary
Boundary getBoundary()
- returns the boundary of a geometry
getDimension
int getDimension()
- The operation "dimension" shall return the inherent dimension of this
Geometry, which shall be less than or equal to the coordinate dimension.
The dimension of a collection of geometric objects shall be the largest
dimension of any of its pieces. Points are 0-dimensional, curves are
1-dimensional, surfaces are 2-dimensional, and solids are 3-dimensional.
getCoordinateDimension
int getCoordinateDimension()
- The operation "coordinateDimension" shall return the dimension of the
coordinates that define this Geometry, which must be the same as the
coordinate dimension of the coordinate reference system for this Geometry.
getCoordinateSystem
CoordinateSystem getCoordinateSystem()
- returns the spatial reference system of a geometry
isEmpty
boolean isEmpty()
- returns true if no geometry values resp. points stored
within the geometry.
distance
double distance(Geometry gmo)
- The operation "distance" shall return the distance between this Geometry
and another Geometry. This distance is defined to be the greatest lower
bound of the set of distances between all pairs of points that include
one each from each of the two Geometries. A "distance" value shall be a
positive number associated to distance units such as meters or standard
foot. If necessary, the second geometric object shall be transformed into
the same coordinate reference system as the first before the distance is
calculated.
If the geometric objects overlap, or touch, then their distance apart
shall be zero. Some current implementations use a "negative" distance for
such cases, but the approach is neither consistent between implementations,
nor theoretically viable.
translate
void translate(double[] d)
- translate a geometry by the submitted values. if the length
of d is smaller then the dimension of the geometry
only the first d.length'th coordinates will be translated.
If the length of d is larger then the dimension of
the geometry an ArrayIndexOutOfBoundExceptions raises.
getCentroid
Point getCentroid()
- The operation "centroid" shall return the mathematical centroid for this
Geometry. The result is not guaranteed to be on the object. For heterogeneous
collections of primitives, the centroid only takes into account those of the
largest dimension. For example, when calculating the centroid of surfaces,
an average is taken weighted by area. Since curves have no area they do not
contribute to the average.
getConvexHull
Geometry getConvexHull()
- The operation "convexHull" shall return a Geometry that represents the
convex hull of this Geometry.
getBuffer
Geometry getBuffer(double distance)
- The operation "buffer" shall return a Geometry containing all points whose
distance from this Geometry is less than or equal to the "distance" passed
as a parameter. The Geometry returned is in the same reference system as
this original Geometry. The dimension of the returned Geometry is normally
the same as the coordinate dimension - a collection of Surfaces in 2D
space and a collection of Solids in 3D space, but this may be application
defined.
contains
boolean contains(Geometry gmo)
- The Boolean valued operation "contains" shall return TRUE if this Geometry
contains another Geometry.
contains
boolean contains(Position position)
- The Boolean valued operation "contains" shall return TRUE if this Geometry
contains a single point given by a coordinate.
intersects
boolean intersects(Geometry gmo)
- The Boolean valued operation "intersects" shall return TRUE if this Geometry
intersects another Geometry. Within a Complex, the Primitives do not
intersect one another. In general, topologically structured data uses shared
geometric objects to capture intersection information.
union
Geometry union(Geometry gmo)
- The "union" operation shall return the set theoretic union of this Geometry
and the passed Geometry.
intersection
Geometry intersection(Geometry gmo)
throws GeometryException
- The "intersection" operation shall return the set theoretic intersection
of this Geometry and the passed Geometry.
- Throws:
GeometryException
difference
Geometry difference(Geometry gmo)
- The "difference" operation shall return the set theoretic difference of
this Geometry and the passed Geometry.
isWithinDistance
boolean isWithinDistance(Geometry gmo,
double distance)
- provide optimized proximity queries within for a distance .
calvin added on 10/21/2003
setTolerance
void setTolerance(double tolerance)
- sets tolerance value use for topological operations
- Parameters:
tolerance
-
getTolerance
double getTolerance()
- returns the tolerance value use for topological operations
- Returns:
- tolerance value use for topological operations
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://deegree.sourceforge.net