|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.model.spatialschema.GeometryImpl org.deegree.model.spatialschema.PrimitiveImpl org.deegree.model.spatialschema.OrientablePrimitiveImpl org.deegree.model.spatialschema.OrientableSurfaceImpl org.deegree.model.spatialschema.SurfaceImpl
public class SurfaceImpl
default implementation of the Surface interface from package deegree.model.spatialschema.
for simplicity of the implementation it is assumed that a surface is build from just one surface patch. this isn't completely conform to the ISO 19107 and the OGC GAIA specification but sufficient for most applications.
It will be extended to fulfill the complete specification as soon as possible.
Field Summary | |
---|---|
protected SurfacePatch[] |
patch
|
Fields inherited from class org.deegree.model.spatialschema.OrientablePrimitiveImpl |
---|
orientation |
Fields inherited from class org.deegree.model.spatialschema.GeometryImpl |
---|
boundary, centroid, convexHull, crs, empty, envelope, mute, valid |
Fields inherited from interface org.deegree.model.spatialschema.Geometry |
---|
BUFFER_CAP_BUTT, BUFFER_CAP_ROUND, BUFFER_CAP_SQUARE |
Constructor Summary | |
---|---|
protected |
SurfaceImpl(char orientation,
SurfaceBoundary boundary)
initializes the surface submitting the orientation and the surfaces boundary. |
protected |
SurfaceImpl(char orientation,
SurfacePatch surfacePatch)
initializes the surface submitting the orientation and one surface patch. |
protected |
SurfaceImpl(char orientation,
SurfacePatch[] surfacePatches)
initializes the surface submitting the orientation and one surface patch. |
protected |
SurfaceImpl(SurfaceBoundary boundary)
initializes the surface with default orientation submitting the surfaces boundary |
protected |
SurfaceImpl(SurfacePatch surfacePatch)
initializes the surface with default orientation submitting one surface patch. |
protected |
SurfaceImpl(SurfacePatch[] surfacePatches)
initializes the surface with default orientation submitting one surface patch. |
protected |
SurfaceImpl(SurfacePatch[] surfacePatches,
CoordinateSystem crs)
initializes the surface with default orientation submitting one surface patch. |
Method Summary | |
---|---|
protected void |
calculateParam()
calculates area, centroid and the envelope of the surface |
java.lang.Object |
clone()
|
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. |
boolean |
equals(java.lang.Object other)
checks if this surface is completly equal to the submitted geometry |
double |
getArea()
The operation "area" shall return the area of this GenericSurface. |
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. |
int |
getDimension()
The operation "dimension" shall return the inherent dimension of this Geometry, which shall be less than or equal to the coordinate dimension. |
int |
getNumberOfSurfacePatches()
|
double |
getPerimeter()
returns the length of all boundaries of the surface in a reference system appropriate for measuring distances. |
SurfaceBoundary |
getSurfaceBoundary()
returns the boundary of the surface |
SurfacePatch |
getSurfacePatchAt(int index)
|
boolean |
intersects(Geometry gmo)
The boolean valued operation "intersects" shall return TRUE if this SurfaceImpl intersects with the given Geometry. |
java.lang.String |
toString()
|
void |
translate(double[] d)
translate each point of the surface with the values of the submitted double array. |
Methods inherited from class org.deegree.model.spatialschema.OrientablePrimitiveImpl |
---|
getOrientation, setOrientation |
Methods inherited from class org.deegree.model.spatialschema.GeometryImpl |
---|
difference, distance, getBoundary, getBuffer, getBuffer, getCentroid, getConvexHull, getCoordinateSystem, getEnvelope, getTolerance, intersection, isEmpty, isValid, isWithinDistance, setCoordinateSystem, setEmpty, setTolerance, setValid, union |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.deegree.model.spatialschema.OrientablePrimitive |
---|
getOrientation, setOrientation |
Methods inherited from interface org.deegree.model.spatialschema.Geometry |
---|
difference, distance, getBoundary, getBuffer, getBuffer, getCentroid, getConvexHull, getCoordinateSystem, getEnvelope, getTolerance, intersection, isEmpty, isWithinDistance, setTolerance, union |
Methods inherited from interface org.deegree.model.spatialschema.GenericSurface |
---|
getEnvelope |
Field Detail |
---|
protected SurfacePatch[] patch
Constructor Detail |
---|
protected SurfaceImpl(SurfacePatch surfacePatch) throws GeometryException
surfacePatch
- patches of the surface.
GeometryException
- will be thrown if orientation is invalidprotected SurfaceImpl(SurfacePatch[] surfacePatches) throws GeometryException
surfacePatches
- patches of the surface.
GeometryException
- will be thrown if orientation is invalidprotected SurfaceImpl(SurfacePatch[] surfacePatches, CoordinateSystem crs) throws GeometryException
surfacePatches
- patches of the surface.crs
-
GeometryException
- will be thrown if orientation is invalidprotected SurfaceImpl(char orientation, SurfacePatch surfacePatch) throws GeometryException
orientation
- of the surfacesurfacePatch
- patches of the surface.
GeometryException
- will be thrown if orientation is invalidprotected SurfaceImpl(char orientation, SurfacePatch[] surfacePatches) throws GeometryException
orientation
- of the surfacesurfacePatches
- patches of the surface.
GeometryException
- will be thrown if orientation is invalidprotected SurfaceImpl(SurfaceBoundary boundary) throws GeometryException
boundary
- boundary of the surface
GeometryException
- will be thrown if orientation is invalidprotected SurfaceImpl(char orientation, SurfaceBoundary boundary) throws GeometryException
orientation
- of the surfaceboundary
- boundary of the surface
GeometryException
- will be thrown if orientation is invalidMethod Detail |
---|
protected void calculateParam()
calculateParam
in class GeometryImpl
public double getPerimeter()
getPerimeter
in interface GenericSurface
public double getArea()
getArea
in interface GenericSurface
public SurfaceBoundary getSurfaceBoundary()
OrientableSurface
getSurfaceBoundary
in interface OrientableSurface
public int getNumberOfSurfacePatches()
getNumberOfSurfacePatches
in interface Surface
public SurfacePatch getSurfacePatchAt(int index) throws GeometryException
getSurfacePatchAt
in interface Surface
index
- the index to look for.
GeometryException
- if the Index is negative.public boolean equals(java.lang.Object other)
equals
in class GeometryImpl
other
- object to compare to
public int getDimension()
getDimension
in interface Geometry
public int getCoordinateDimension()
getCoordinateDimension
in interface Geometry
public java.lang.Object clone()
clone
in class GeometryImpl
public void translate(double[] d)
translate
in interface Geometry
translate
in class GeometryImpl
d
- vector to translate the geometry withpublic boolean intersects(Geometry gmo)
intersects
in interface Geometry
intersects
in class GeometryImpl
gmo
- the Geometry to test for intersection
public boolean contains(Position position)
contains
in interface Geometry
contains
in class GeometryImpl
position
- Position to test (whether is is contained)
public boolean contains(Geometry gmo)
contains
in interface Geometry
contains
in class GeometryImpl
gmo
- the Geometry to test (whether is is contained)
public java.lang.String toString()
toString
in class GeometryImpl
|
deegree 2.5 (2011/06/29 09:44 build-8-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