it.cutruzzula.lgml.geometry
Class Point

java.lang.Object
  extended by it.cutruzzula.lgml.geometry.AbstractGeometry
      extended by it.cutruzzula.lgml.geometry.Point

public class Point
extends AbstractGeometry

The class represents a POINT object.


Constructor Summary
Point(double x, double y)
          Constructor for 2D point.
Point(double x, double y, double z)
          Constructor for 3D point.
 
Method Summary
 java.lang.String asWKT()
          Method to get the WKT form of this point object.
 boolean equals(java.lang.Object o)
           
 java.lang.String getType()
          Method to get the geometry type.
 double getX()
          Method to get the x coordinate.
 double getY()
          Method to get the y coordinate.
 double getZ()
          Method to get the z dimension.
 
Methods inherited from class it.cutruzzula.lgml.geometry.AbstractGeometry
getSrsDimension, getSrsName, setSrsName
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Point

public Point(double x,
             double y)
Constructor for 2D point.

Parameters:
x - The x coordinate
y - The y coordinate

Point

public Point(double x,
             double y,
             double z)
Constructor for 3D point.

Parameters:
x - The x coordinate
y - The y coordinate
z - The z dimension
Method Detail

getX

public double getX()
Method to get the x coordinate.

Returns:
The x coordinate

getY

public double getY()
Method to get the y coordinate.

Returns:
The y coordinate

getZ

public double getZ()
Method to get the z dimension.

Returns:
The z dimension

asWKT

public java.lang.String asWKT()
Method to get the WKT form of this point object.

Specified by:
asWKT in class AbstractGeometry
Returns:
The WKT string

getType

public java.lang.String getType()
Method to get the geometry type.

Specified by:
getType in class AbstractGeometry
Returns:
"POINT" constant

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object