Spatial DataBlade
JAVA API v8.21

com.ibm.spatial.geom
Class CoordPoint.LongZM

java.lang.Object
  extended by com.ibm.spatial.geom.CoordPoint
      extended by com.ibm.spatial.geom.CoordPoint.Long
          extended by com.ibm.spatial.geom.CoordPoint.LongZM
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Enclosing class:
CoordPoint

public static class CoordPoint.LongZM
extends CoordPoint.Long

The LongZM class defines a CoordPoint specified in integer coordinates. Besides x and y, the point may have both a z coordinate and a measure.

CoordPoint.LongZM objects which don't have a z coordinate or a measure will have the corresponding fields initialized to java.lang.Long.MIN_VALUE. This is an implementation detail which may change in the future. The API users should use hasZ and hasM members in order to determine whether a CoordPoint.LongZM has a z coordinate or measure.

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
 long m
          The m coordinate of this CoordPoint.
 long z
          The z coordinate of this CoordPoint.
 
Fields inherited from class com.ibm.spatial.geom.CoordPoint.Long
x, y
 
Constructor Summary
CoordPoint.LongZM()
          Constructs a new CoordPoint.
CoordPoint.LongZM(CoordPoint point)
          Constructs and initializes a CoordPoint from the coordinates of the specified CoordPoint.
CoordPoint.LongZM(long x, long y)
          Constructs and initializes a CoordPoint from the specified coordinates.
CoordPoint.LongZM(long x, long y, long z, long m)
          Constructs and initializes a CoordPoint from the specified coordinates.
CoordPoint.LongZM(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 getZ()
          Returns the Z coordinate of this CoordPoint.
 boolean hasM()
          Determines whether or not this CoordPoint has a measure.
 boolean hasZ()
          Determines whether or not this CoordPoint has a Z coordinate.
 boolean isEmpty()
          Tests whether this CoordPoint is empty.
 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.
 void setM(double m)
          Sets the measure of this CoordPoint to the specified value.
 void setZ(double z)
          Sets the coordinates of this CoordPoint to the specified values.
 java.lang.String toString()
          Returns the String representation of this CoordPoint.
 
Methods inherited from class com.ibm.spatial.geom.CoordPoint.Long
getX, getY, setCoord
 
Methods inherited from class com.ibm.spatial.geom.CoordPoint
clone, equals, equals, getCoordAt, hashCode, setCoord
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

z

public long z
The z coordinate of this CoordPoint.


m

public long m
The m coordinate of this CoordPoint.

Constructor Detail

CoordPoint.LongZM

public CoordPoint.LongZM()
Constructs a new CoordPoint.


CoordPoint.LongZM

public CoordPoint.LongZM(long x,
                         long 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.LongZM

public CoordPoint.LongZM(long x,
                         long y,
                         long z,
                         long m)
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
z - the z coordinate value of the newly constructed CoordPoint or java.lang.Long.MIN_VALUE
m - the m value of the newly constructed CoordPoint or java.lang.Long.MIN_VALUE

CoordPoint.LongZM

public CoordPoint.LongZM(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.LongZM

public CoordPoint.LongZM(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

getZ

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

Overrides:
getZ in class CoordPoint.Long
Returns:
the Z coordinate of this CoordPoint in double precision.

getM

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

Overrides:
getM in class CoordPoint.Long
Returns:
the measure of this CoordPoint in double precision.

setCoordAt

public void setCoordAt(int n,
                       double value)
                throws java.lang.IndexOutOfBoundsException
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.

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

setZ

public void setZ(double z)
Sets the coordinates of this CoordPoint to the specified values.

Overrides:
setZ in class CoordPoint
Parameters:
x - the x coordinate value
y - the y coordinate value
z - the z coordinate value - this value is ignored

setM

public void setM(double m)
Sets the measure of this CoordPoint to the specified value.

Overrides:
setM in class CoordPoint
Parameters:
m - the measure value - this argument is ignored

setEmpty

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

Overrides:
setEmpty in class CoordPoint.Long

isEmpty

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

Overrides:
isEmpty in class CoordPoint.Long
Returns:
true if this point is empty; otherwise, returns false

hasZ

public boolean hasZ()
Determines whether or not this CoordPoint has a Z coordinate.

Overrides:
hasZ in class CoordPoint
Returns:
true if this CoordPoint has a Z coordinate; false otherwise.

hasM

public boolean hasM()
Determines whether or not this CoordPoint has a measure.

Overrides:
hasM in class CoordPoint
Returns:
true if this CoordPoint has a measure; false otherwise.

toString

public java.lang.String toString()
Returns the String representation of this CoordPoint.

Overrides:
toString in class CoordPoint.Long
Returns:
a String representing this CoordPoint.

Spatial DataBlade
JAVA API v8.21


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