org.deegree_impl.model.geometry
Class GM_Position_Impl

java.lang.Object
  extended byorg.deegree_impl.model.geometry.GM_Position_Impl
All Implemented Interfaces:
GM_Position, java.io.Serializable

class GM_Position_Impl
extends java.lang.Object
implements GM_Position, java.io.Serializable

A sequence of decimals numbers which when written on a width are a sequence of coordinate positions. The width is derived from the CRS or coordinate dimension of the container.

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

Version:
Author:
Andreas Poth


Field Summary
private  double mute
           
private  double[] point
           
private static long serialVersionUID
          Use serialVersionUID for interoperability.
 
Constructor Summary
(package private) GM_Position_Impl()
          constructor. initializes a point to the coordinate 0/0
(package private) GM_Position_Impl(double[] coords)
          constructor.
(package private) GM_Position_Impl(double x, double y)
          constructor
(package private) GM_Position_Impl(double x, double y, double z)
          constructor
 
Method Summary
 java.lang.Object clone()
          returns a shallow copy of the geometry.
 boolean equals(java.lang.Object other)
          compares if all field of other are equal to the corresponding fields of this position
 double[] getAsArray()
          returns the position as a array the first field contains the x- the second field the y-value etc.
 double getX()
          returns the x-value of this point
 double getY()
          returns the y-value of this point
 double getZ()
          returns the z-value of this point
 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 java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Use serialVersionUID for interoperability.

See Also:
Constant Field Values

point

private double[] point

mute

private double mute
Constructor Detail

GM_Position_Impl

GM_Position_Impl()
constructor. initializes a point to the coordinate 0/0


GM_Position_Impl

GM_Position_Impl(double x,
                 double y)
constructor

Parameters:
x - x-value of the point
y - y-value of the point

GM_Position_Impl

GM_Position_Impl(double x,
                 double y,
                 double z)
constructor

Parameters:
x - x-value of the point
y - y-value of the point
z - z-value of the point

GM_Position_Impl

GM_Position_Impl(double[] coords)
constructor.

Method Detail

clone

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


getX

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

Specified by:
getX in interface GM_Position

getY

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

Specified by:
getY in interface GM_Position

getZ

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

Specified by:
getZ in interface GM_Position

getAsArray

public double[] getAsArray()
returns the position as a array the first field contains the x- the second field the y-value etc.

Specified by:
getAsArray in interface GM_Position

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_Position

equals

public boolean equals(java.lang.Object other)
compares if all field of other are equal to the corresponding fields of this position


toString

public java.lang.String toString()
Returns: