org.deegree_impl.model.geometry
Class GM_Point_Impl

java.lang.Object
  extended byorg.deegree_impl.model.geometry.GM_Object_Impl
      extended byorg.deegree_impl.model.geometry.GM_Primitive_Impl
          extended byorg.deegree_impl.model.geometry.GM_Point_Impl
All Implemented Interfaces:
GM_Object, GM_Point, GM_Primitive, java.io.Serializable

final class GM_Point_Impl
extends GM_Primitive_Impl
implements GM_Point, java.io.Serializable

default implementation of the GM_Point interface.

------------------------------------------------------------

Version:
5.6.2001
Author:
Andreas Poth


Field Summary
private  GM_Position position
           
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_Point_Impl(CS_CoordinateSystem crs)
          constructor. initializes a point to the coordinate 0/0
GM_Point_Impl(double x, double y, CS_CoordinateSystem crs)
          constructor for initializing a point within a two-dimensional coordinate system
GM_Point_Impl(double x, double y, double z, CS_CoordinateSystem crs)
          constructor for initializing a point within a three-dimensional coordinate system
GM_Point_Impl(GM_Point gmo)
          constructor
GM_Point_Impl(GM_Position gmo, CS_CoordinateSystem crs)
          constructor
 
Method Summary
protected  void calculateParam()
          recalculates internal parameters
 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 equals(java.lang.Object other)
          checks if this point is completly equal to the submitted geometry
 double[] getAsArray()
          returns the x- and y-value of the point as a two dimensional array the first field contains the x- the second field the y-value.
 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.
 GM_Position getPosition()
          returns the position of the point
 double getX()
          returns the x-value of this point
 double getY()
          returns the y-value of this point
 double getZ()
          returns the y-value of this point
 boolean intersects(GM_Object gmo)
          The Boolean valued operation "intersects" shall return TRUE if this GM_Object intersects another GM_Object.
private  boolean intersectsAggregate(GM_Aggregate mprim)
          the operations returns true if the submitted multi primitive intersects with the curve segment
 java.lang.String toString()
           
 void translate(double[] d)
          translate the point by the submitted values. the dz- value will be ignored.
 
Methods inherited from class org.deegree_impl.model.geometry.GM_Object_Impl
contains, 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_Object
contains, difference, distance, getBoundary, getBuffer, getCentroid, getConvexHull, getCoordinateSystem, getEnvelope, intersection, isEmpty, isWithinDistance, union
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Use serialVersionUID for interoperability.

See Also:
Constant Field Values

position

private GM_Position position
Constructor Detail

GM_Point_Impl

public GM_Point_Impl(CS_CoordinateSystem crs)
constructor. initializes a point to the coordinate 0/0

Parameters:
crs - spatial reference system of the point

GM_Point_Impl

public GM_Point_Impl(double x,
                     double y,
                     CS_CoordinateSystem crs)
constructor for initializing a point within a two-dimensional coordinate system

Parameters:
x - x-value of the point
y - y-value of the point
crs - spatial reference system of the point

GM_Point_Impl

public GM_Point_Impl(double x,
                     double y,
                     double z,
                     CS_CoordinateSystem crs)
constructor for initializing a point within a three-dimensional coordinate system

Parameters:
x - x-value of the point
y - y-value of the point
z - z-value of the point
crs - spatial reference system of the point

GM_Point_Impl

public GM_Point_Impl(GM_Point gmo)
constructor

Parameters:
gmo - existing GM_Point

GM_Point_Impl

public GM_Point_Impl(GM_Position gmo,
                     CS_CoordinateSystem crs)
constructor

Parameters:
gmo - existing GM_Point
crs - spatial reference system of the point
Method Detail

equals

public boolean equals(java.lang.Object other)
checks if this point is completly equal to the submitted geometry

Overrides:
equals in class GM_Object_Impl
Parameters:
other - the GM_Object to test for equality
Returns:
true if the objects are equal, else false

getDimension

public 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. 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.

Specified by:
getDimension in interface GM_Object

getCoordinateDimension

public 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.

Specified by:
getCoordinateDimension in interface GM_Object

clone

public java.lang.Object clone()
returns a shallow copy of the geometry.

Overrides:
clone in class GM_Object_Impl

getX

public double getX()
returns the x-value of this point

Specified by:
getX in interface GM_Point

getY

public double getY()
returns the y-value of this point

Specified by:
getY in interface GM_Point

getZ

public double getZ()
returns the y-value of this point

Specified by:
getZ in interface GM_Point

getAsArray

public double[] getAsArray()
returns the x- and y-value of the point as a two dimensional array the first field contains the x- the second field the y-value.

Specified by:
getAsArray in interface GM_Point

translate

public void translate(double[] d)
translate the point by the submitted values. the dz- value will be ignored.

Specified by:
translate in interface GM_Object
Overrides:
translate in class GM_Object_Impl

getPosition

public GM_Position getPosition()
Description copied from interface: GM_Point
returns the position of the point

Specified by:
getPosition in interface GM_Point
Returns:

intersects

public boolean intersects(GM_Object gmo)
The Boolean valued operation "intersects" shall return TRUE if this GM_Object intersects another GM_Object. Within a GM_Complex, the GM_Primitives do not intersect one another. In general, topologically structured data uses shared geometric objects to capture intersection information.

dummy implementation

Specified by:
intersects in interface GM_Object
Overrides:
intersects in class GM_Object_Impl
Parameters:
gmo - the GM_Object to intersect with
Returns:
true if the objects intersects, else false

intersectsAggregate

private boolean intersectsAggregate(GM_Aggregate mprim)
                             throws java.lang.Exception
the operations returns true if the submitted multi primitive intersects with the curve segment

Throws:
java.lang.Exception

contains

public boolean contains(GM_Object gmo)
The Boolean valued operation "contains" shall return TRUE if this GM_Object contains another GM_Object.

Specified by:
contains in interface GM_Object
Overrides:
contains in class GM_Object_Impl
Parameters:
gmo - the GM_Object to test (whether is is contained)
Returns:
true if the given object is contained, else false

calculateParam

protected void calculateParam()
recalculates internal parameters

Specified by:
calculateParam in class GM_Object_Impl

toString

public java.lang.String toString()
Overrides:
toString in class GM_Object_Impl
Returns: