Spatial DataBlade
JAVA API v8.21

com.ibm.spatial.geom
Class CoordPoint.Double

java.lang.Object
  extended by com.ibm.spatial.geom.CoordPoint
      extended by com.ibm.spatial.geom.CoordPoint.Double
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
CoordPoint.DoubleZM
Enclosing class:
CoordPoint

public static class CoordPoint.Double
extends CoordPoint

The Double class defines a 2D CoordPoint specified in double precision coordinates.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.ibm.spatial.geom.CoordPoint
CoordPoint.Double, CoordPoint.DoubleZM, CoordPoint.Long, CoordPoint.LongZM
 
Field Summary
 double x
          The x coordinate of this CoordPoint.
 double y
          The y coordinate of this CoordPoint.
 
Constructor Summary
CoordPoint.Double()
          Constructs a new 2D (no z coordinate and measure) CoordPoint.
CoordPoint.Double(CoordPoint point)
          Constructs and initializes a CoordPoint from the coordinates of the specified CoordPoint.
CoordPoint.Double(double x, double y)
          Constructs and initializes a CoordPoint from the specified coordinates.
CoordPoint.Double(Point point)
          Constructs and initializes a CoordPoint from the coordinates of the specified OGC Point.
 
Method Summary
 double getM()
          Returns the measure associated to this CoordPoint.
 double getX()
          Returns the X coordinate of this CoordPoint.
 double getY()
          Returns the Y coordinate of this CoordPoint.
 double getZ()
          Returns the Z coordinate of this CoordPoint.
 boolean isEmpty()
          Tests whether this CoordPoint is empty.
 void setCoord(double x, double y)
          Sets the coordinates of this CoordPoint to the specified values.
 void setCoordAt(int n, double value)
          Sets the coordinate specified by index n with the value specified by value, where n=0 corresponds to x, n=1 to y, n=2 to z, and n=3 to m.
 void setEmpty()
          Sets this CoordPoint to be empty.
 
Methods inherited from class com.ibm.spatial.geom.CoordPoint
clone, equals, equals, getCoordAt, hashCode, hasM, hasZ, setCoord, setM, setZ, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

x

public double x
The x coordinate of this CoordPoint.


y

public double y
The y coordinate of this CoordPoint.

Constructor Detail

CoordPoint.Double

public CoordPoint.Double()
Constructs a new 2D (no z coordinate and measure) CoordPoint.


CoordPoint.Double

public CoordPoint.Double(double x,
                         double y)
Constructs and initializes a CoordPoint from the specified coordinates.

Parameters:
x - the x coordinate value of the newly constructed CoordPoint
y - the y coordinate value of the newly constructed CoordPoint

CoordPoint.Double

public CoordPoint.Double(CoordPoint point)
Constructs and initializes a CoordPoint from the coordinates of the specified CoordPoint.

Parameters:
point - the CoordPoint to be used for the newly constructed CoordPoint initialization

CoordPoint.Double

public CoordPoint.Double(Point point)
Constructs and initializes a CoordPoint from the coordinates of the specified OGC Point.

Parameters:
point - the OGC Point to be used for the newly constructed CoordPoint initialization
Method Detail

getX

public double getX()
Returns the X coordinate of this CoordPoint.

Specified by:
getX in class CoordPoint
Returns:
the X coordinate of this CoordPoint in double precision.

getY

public double getY()
Returns the Y coordinate of this CoordPoint.

Specified by:
getY in class CoordPoint
Returns:
the Y coordinate of this CoordPoint in double precision.

getZ

public double getZ()
Returns the Z coordinate of this CoordPoint.

Specified by:
getZ in class CoordPoint
Returns:
the Z coordinate of this CoordPoint in double precision.

getM

public double getM()
Returns the measure associated to this CoordPoint.

Specified by:
getM in class CoordPoint
Returns:
the measure of this CoordPoint in double precision.

setCoordAt

public void setCoordAt(int n,
                       double value)
Sets the coordinate specified by index n with the value specified by value, where n=0 corresponds to x, n=1 to y, n=2 to z, and n=3 to m.

Specified by:
setCoordAt in class CoordPoint
Parameters:
n - the measure value
Throws:
java.lang.IndexOutOfBoundsException - id n < 0 or n > 3

setCoord

public void setCoord(double x,
                     double y)
Sets the coordinates of this CoordPoint to the specified values.

Specified by:
setCoord in class CoordPoint
Parameters:
x - the x coordinate value
y - the y coordinate value

setEmpty

public void setEmpty()
Sets this CoordPoint to be empty.

Specified by:
setEmpty in class CoordPoint

isEmpty

public boolean isEmpty()
Tests whether this CoordPoint is empty.

Specified by:
isEmpty in class CoordPoint
Returns:
true if this point is empty; otherwise, returns false

Spatial DataBlade
JAVA API v8.21


Licensed Materials - Property of IBM
Copyright IBM Corp. 2002, 2012 All Rights Reserved.