|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree_impl.model.geometry.GM_Object_Impl
org.deegree_impl.model.geometry.GM_Primitive_Impl
org.deegree_impl.model.geometry.GM_OrientablePrimitive_Impl
org.deegree_impl.model.geometry.GM_OrientableSurface_Impl
org.deegree_impl.model.geometry.GM_Surface_Impl
default implementation of the GM_Surface interface from package jago.model.
for simplicity of the implementation it is assumed that a surface is build from just one surface patch. this isn't completly confrom to the ISO 19107 and the OGC GAIA specification but sufficient for most applications. It will be extended to fullfill the complete specs as soon as possible.-----------------------------------------------------------------------
Field Summary | |
private double |
area
|
protected char |
orientation
|
protected GM_SurfacePatch |
patch
|
private static long |
serialVersionUID
Use serialVersionUID for interoperability. |
Fields inherited from class org.deegree_impl.model.geometry.GM_Object_Impl |
boundary, centroid, convexHull, crs, empty, envelope, mute, valid |
Constructor Summary | |
GM_Surface_Impl(char orientation,
GM_SurfaceBoundary boundary)
initializes the surface submitting the orientation and the surfaces boundary. |
|
GM_Surface_Impl(char orientation,
GM_SurfacePatch surfacePatch)
initializes the surface submitting the orientation and one surface patch. |
|
GM_Surface_Impl(GM_SurfaceBoundary boundary)
initializes the surface with default orientation submitting the surfaces boundary |
|
GM_Surface_Impl(GM_SurfacePatch surfacePatch)
initializes the surface with default orientation submitting one surface patch. |
Method Summary | |
void |
addSurfacePatch(GM_SurfacePatch patch)
adds a surface patch at the end of the curve |
private void |
calculateBoundary()
calculates the boundary and area of the surface |
private void |
calculateCentroidArea()
calculates the centroid and area of the surface |
private void |
calculateEnvelope()
calculates the envelope of the surface |
protected void |
calculateParam()
calculates area, centroid and the envelope of the surface |
java.lang.Object |
clone()
returns a shallow copy of the geometry |
boolean |
contains(GM_Object gmo)
The Boolean valued operation "contains" shall return TRUE if this GM_Object contains another GM_Object. |
boolean |
contains(GM_Position position)
The Boolean valued operation "contains" shall return TRUE if this GM_Object contains a single point given by a coordinate. |
void |
deleteSurfacePatchAt(int index)
deletes the surface patch at the submitted index |
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 GM_GenericSurface. |
int |
getCoordinateDimension()
The operation "coordinateDimension" shall return the dimension of the coordinates that define this GM_Object, which must be the same as the coordinate dimension of the coordinate reference system for this GM_Object. |
int |
getDimension()
The operation "dimension" shall return the inherent dimension of this GM_Object, which shall be less than or equal to the coordinate dimension. |
int |
getNumberOfSurfacePatches()
returns the number of patches building the surface |
char |
getOrientation()
returns the orientation of a curve |
double |
getPerimeter()
returns the length of all boundaries of the surface in a reference system appropriate for measuring distances. |
GM_SurfaceBoundary |
getSurfaceBoundary()
returns the boundary of the surface as surface boundary |
GM_SurfacePatch |
getSurfacePatchAt(int index)
returns the surface patch at the submitted index |
void |
insertSurfacePatchAt(GM_SurfacePatch patch,
int index)
inserts a surface patch in the curve at the submitted position. all points with a position that equals index or is higher will be shifted |
boolean |
intersects(GM_Object gmo)
The boolean valued operation "intersects" shall return TRUE if this GM_Surface_Impl intersects with the given GM_Object. |
void |
setOrientation(char orientation)
sets the curves orientation |
void |
setSurfacePatchAt(GM_SurfacePatch patch,
int index)
writes a surface patch to the surface at submitted position. the old patch will be deleted |
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_impl.model.geometry.GM_Object_Impl |
difference, distance, getBoundary, getBuffer, getCentroid, getConvexHull, getCoordinateSystem, getEnvelope, intersection, isEmpty, isValid, isWithinDistance, setCoordinateSystem, setEmpty, setValid, union |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.deegree.model.geometry.GM_OrientablePrimitive |
getOrientation, setOrientation |
Methods inherited from interface org.deegree.model.geometry.GM_Object |
difference, distance, getBoundary, getBuffer, getCentroid, getConvexHull, getCoordinateSystem, getEnvelope, intersection, isEmpty, isWithinDistance, union |
Methods inherited from interface org.deegree.model.geometry.GM_GenericSurface |
getEnvelope |
Field Detail |
private static final long serialVersionUID
protected GM_SurfacePatch patch
private double area
protected char orientation
Constructor Detail |
public GM_Surface_Impl(GM_SurfacePatch surfacePatch) throws GM_Exception
surfacePatch
- patches of the surface.public GM_Surface_Impl(char orientation, GM_SurfacePatch surfacePatch) throws GM_Exception
surfacePatch
- patches of the surface.public GM_Surface_Impl(GM_SurfaceBoundary boundary) throws GM_Exception
boundary
- boundary of the surfacepublic GM_Surface_Impl(char orientation, GM_SurfaceBoundary boundary) throws GM_Exception
boundary
- boundary of the surfaceMethod Detail |
private void calculateCentroidArea()
private void calculateBoundary()
protected void calculateParam()
calculateParam
in class GM_Object_Impl
private void calculateEnvelope()
public double getPerimeter()
getPerimeter
in interface GM_GenericSurface
public double getArea()
getArea
in interface GM_GenericSurface
public GM_SurfaceBoundary getSurfaceBoundary()
getSurfaceBoundary
in interface GM_OrientableSurface
public int getNumberOfSurfacePatches()
getNumberOfSurfacePatches
in interface GM_Surface
public GM_SurfacePatch getSurfacePatchAt(int index) throws GM_Exception
getSurfacePatchAt
in interface GM_Surface
GM_Exception
public void setSurfacePatchAt(GM_SurfacePatch patch, int index) throws GM_Exception
setSurfacePatchAt
in interface GM_Surface
GM_Exception
public void insertSurfacePatchAt(GM_SurfacePatch patch, int index) throws GM_Exception
insertSurfacePatchAt
in interface GM_Surface
GM_Exception
public void addSurfacePatch(GM_SurfacePatch patch)
addSurfacePatch
in interface GM_Surface
public void deleteSurfacePatchAt(int index) throws GM_Exception
deleteSurfacePatchAt
in interface GM_Surface
GM_Exception
public boolean equals(java.lang.Object other)
equals
in class GM_Object_Impl
other
- object to compare to
public int getDimension()
getDimension
in interface GM_Object
public int getCoordinateDimension()
getCoordinateDimension
in interface GM_Object
public java.lang.Object clone()
clone
in class GM_Object_Impl
public void translate(double[] d)
translate
in interface GM_Object
translate
in class GM_Object_Impl
public boolean intersects(GM_Object gmo)
intersects
in interface GM_Object
intersects
in class GM_Object_Impl
gmo
- the GM_Object to test for intersection
public boolean contains(GM_Position position)
contains
in interface GM_Object
contains
in class GM_Object_Impl
position
- GM_Position to test (whether is is contained)
public boolean contains(GM_Object gmo)
contains
in interface GM_Object
contains
in class GM_Object_Impl
gmo
- the GM_Object to test (whether is is contained)
public java.lang.String toString()
toString
in class GM_Object_Impl
public char getOrientation()
getOrientation
in interface GM_OrientablePrimitive
public void setOrientation(char orientation) throws GM_Exception
setOrientation
in interface GM_OrientablePrimitive
orientation
- orientation of the curve ('+'|'-')
GM_Exception
- will be thrown if orientation is invalid
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |