|
deegree 2.3 (2010/04/09 10:10 build-4-official) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.model.spatialschema.GeometryImpl
public abstract class GeometryImpl
Default implementation of the Geometry interface from package deegree.model. The implementation is abstract because only the management of the spatial reference system is unique for all geometries.
| Field Summary | |
|---|---|
protected Boundary |
boundary
|
protected Point |
centroid
|
protected Geometry |
convexHull
|
protected CoordinateSystem |
crs
|
protected boolean |
empty
|
protected Envelope |
envelope
|
protected double |
mute
|
protected boolean |
valid
|
| Fields inherited from interface org.deegree.model.spatialschema.Geometry |
|---|
BUFFER_CAP_BUTT, BUFFER_CAP_ROUND, BUFFER_CAP_SQUARE |
| Constructor Summary | |
|---|---|
protected |
GeometryImpl(CoordinateSystem crs)
constructor that sets the spatial reference system |
| Method Summary | |
|---|---|
protected abstract void |
calculateParam()
recalculates internal parameters |
Object |
clone()
|
boolean |
contains(Geometry that)
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 that)
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. |
boolean |
equals(Object that)
Compares the Geometry to be equal to another Geometry. |
Boundary |
getBoundary()
returns the boundary of the surface as general boundary |
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. |
Geometry |
getBuffer(double distance,
int segments,
int capStyle)
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. |
CoordinateSystem |
getCoordinateSystem()
|
Envelope |
getEnvelope()
returns the bounding box / envelope of a geometry |
double |
getTolerance()
returns the tolerance value use for topological operations |
Geometry |
intersection(Geometry that)
The "intersection" operation shall return the set theoretic intersection of this Geometry and the passed Geometry. |
boolean |
intersects(Geometry that)
The Boolean valued operation "intersects" shall return TRUE if this Geometry intersects another Geometry. |
boolean |
isEmpty()
|
protected boolean |
isValid()
|
boolean |
isWithinDistance(Geometry that,
double distance)
provide optimized proximity queries within for a distance . calvin added on 10/21/2003 |
void |
setCoordinateSystem(CoordinateSystem crs)
sets the spatial reference system |
void |
setEmpty(boolean empty)
|
void |
setTolerance(double tolerance)
sets tolerance value use for topological operations |
protected void |
setValid(boolean valid)
|
String |
toString()
|
void |
translate(double[] d)
dummy implementation of this method |
Geometry |
union(Geometry that)
The "union" operation shall return the set theoretic union of this Geometry and the passed Geometry. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.deegree.model.spatialschema.Geometry |
|---|
getCoordinateDimension, getDimension |
| Field Detail |
|---|
protected double mute
protected CoordinateSystem crs
protected Boundary boundary
protected Envelope envelope
protected Geometry convexHull
protected Point centroid
protected boolean empty
protected boolean valid
| Constructor Detail |
|---|
protected GeometryImpl(CoordinateSystem crs)
crs - new spatial reference system| Method Detail |
|---|
public CoordinateSystem getCoordinateSystem()
getCoordinateSystem in interface Geometrypublic void setCoordinateSystem(CoordinateSystem crs)
crs - new spatial reference system
public Object clone()
throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic boolean isEmpty()
isEmpty in interface Geometrypublic void setEmpty(boolean empty)
empty - indicates the geometry as emptypublic Boundary getBoundary()
getBoundary in interface Geometrypublic void translate(double[] d)
translate in interface Geometryd - vector to translate the geometry withpublic 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.
distance in interface Geometrypublic 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.
getCentroid in interface Geometrypublic Envelope getEnvelope()
getEnvelope in interface Geometrypublic Geometry getConvexHull()
getConvexHull in interface Geometryan may has an useful implementation in extending classespublic Geometry getBuffer(double distance)
getBuffer in interface Geometry
public Geometry getBuffer(double distance,
int segments,
int capStyle)
Geometry
getBuffer in interface Geometrypublic boolean contains(Geometry that)
contains in interface Geometrythat - the Geometry to test (whether is is contained)
public boolean contains(Position position)
contains in interface Geometryposition - Position to test (whether is is contained)
public boolean intersects(Geometry that)
intersects in interface Geometrythat - the Geometry to intersect with
public Geometry union(Geometry that)
union in interface Geometrythat - the Geometry to unify
public Geometry intersection(Geometry that)
throws GeometryException
intersection in interface Geometrythat - the Geometry to intersect with
GeometryExceptionpublic Geometry difference(Geometry that)
difference in interface Geometrythat - the Geometry to calculate the difference with
public boolean equals(Object that)
equals in class Objectthat - the Geometry to test for equality
public boolean isWithinDistance(Geometry that,
double distance)
isWithinDistance in interface Geometrypublic void setTolerance(double tolerance)
setTolerance in interface Geometrytolerance - public double getTolerance()
getTolerance in interface Geometryprotected void setValid(boolean valid)
valid - invalidates the calculated parameters of the Geometryprotected boolean isValid()
protected abstract void calculateParam()
public String toString()
toString in class Object
|
deegree 2.3 (2010/04/09 10:10 build-4-official) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org