org.geotools.pt
Class CoordinatePoint

java.lang.Object
  extended byorg.geotools.pt.CoordinatePoint
All Implemented Interfaces:
java.lang.Cloneable, org.opengis.util.Cloneable, Dimensioned, org.opengis.spatialschema.geometry.DirectPosition, org.opengis.spatialschema.geometry.geometry.Position, java.io.Serializable

Deprecated. Replaced by GeneralDirectPosition in the org.geotools.geometry package.

public class CoordinatePoint
extends java.lang.Object
implements org.opengis.spatialschema.geometry.DirectPosition, Dimensioned, org.opengis.util.Cloneable, java.io.Serializable

A position defined by a list of numbers. The ordinate values are indexed from 0 to (numDim-1), where numDim is the dimension of the coordinate system the coordinate point belongs in.

Version:
$Id: CoordinatePoint.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
Martin Desruisseaux
See Also:
PT_CoordinatePoint, Point2D, Serialized Form

Field Summary
 double[] ord
          Deprecated. The ordinates of the coordinate point.
 
Constructor Summary
CoordinatePoint(CoordinatePoint point)
          Deprecated. Construct a coordinate initialized to the same values than the specified point.
CoordinatePoint(double[] ord)
          Deprecated. Construct a coordinate with the specified ordinates.
CoordinatePoint(double x, double y)
          Deprecated. Construct a 2D coordinate from the specified ordinates.
CoordinatePoint(double x, double y, double z)
          Deprecated. Construct a 3D coordinate from the specified ordinates.
CoordinatePoint(int numDim)
          Deprecated. Construct a coordinate with the specified number of dimensions.
CoordinatePoint(java.awt.geom.Point2D point)
          Deprecated. Construct a coordinate from the specified Point2D.
 
Method Summary
 java.lang.Object clone()
          Deprecated. Returns a deep copy of this coordinate.
 boolean equals(java.lang.Object object)
          Deprecated. Compares the specified object with this coordinate for equality.
 org.opengis.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()
          Deprecated. Returns always null.
 double[] getCoordinates()
          Deprecated. Returns ord.
 int getDimension()
          Deprecated. The number of ordinates of a CoordinatePoint.
 double getOrdinate(int dimension)
          Deprecated. Returns the ordinate value along the specified dimension.
 org.opengis.spatialschema.geometry.DirectPosition getPosition()
          Deprecated. Returns always this.
 int hashCode()
          Deprecated. Returns a hash value for this coordinate.
 void setLocation(CoordinatePoint point)
          Deprecated. Set this coordinate to the specified CoordinatePoint.
 void setLocation(java.awt.geom.Point2D point)
          Deprecated. Set this coordinate to the specified Point2D.
 void setOrdinate(int dimension, double value)
          Deprecated. 
 java.awt.geom.Point2D toPoint2D()
          Deprecated. Returns a Point2D with the same coordinate as this CoordinatePoint.
 java.lang.String toString()
          Deprecated. Returns a string representation of this coordinate.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ord

public final double[] ord
Deprecated. 
The ordinates of the coordinate point.

See Also:
PT_CoordinatePoint.ord
Constructor Detail

CoordinatePoint

public CoordinatePoint(int numDim)
                throws java.lang.NegativeArraySizeException
Deprecated. 
Construct a coordinate with the specified number of dimensions.

Parameters:
numDim - Number of dimensions.
Throws:
java.lang.NegativeArraySizeException - if numDim is negative.

CoordinatePoint

public CoordinatePoint(double[] ord)
Deprecated. 
Construct a coordinate with the specified ordinates. The ord array will be copied.


CoordinatePoint

public CoordinatePoint(double x,
                       double y)
Deprecated. 
Construct a 2D coordinate from the specified ordinates.


CoordinatePoint

public CoordinatePoint(double x,
                       double y,
                       double z)
Deprecated. 
Construct a 3D coordinate from the specified ordinates.


CoordinatePoint

public CoordinatePoint(java.awt.geom.Point2D point)
Deprecated. 
Construct a coordinate from the specified Point2D.


CoordinatePoint

public CoordinatePoint(CoordinatePoint point)
Deprecated. 
Construct a coordinate initialized to the same values than the specified point.

Method Detail

getPosition

public org.opengis.spatialschema.geometry.DirectPosition getPosition()
Deprecated. 
Returns always this.

Specified by:
getPosition in interface org.opengis.spatialschema.geometry.geometry.Position

getCoordinateReferenceSystem

public org.opengis.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()
Deprecated. 
Returns always null.

Specified by:
getCoordinateReferenceSystem in interface org.opengis.spatialschema.geometry.DirectPosition

getCoordinates

public double[] getCoordinates()
Deprecated. 
Returns ord.

Specified by:
getCoordinates in interface org.opengis.spatialschema.geometry.DirectPosition

setOrdinate

public void setOrdinate(int dimension,
                        double value)
                 throws java.lang.IndexOutOfBoundsException
Deprecated. 

Specified by:
setOrdinate in interface org.opengis.spatialschema.geometry.DirectPosition
Throws:
java.lang.IndexOutOfBoundsException

setLocation

public void setLocation(java.awt.geom.Point2D point)
                 throws org.opengis.spatialschema.geometry.MismatchedDimensionException
Deprecated. 
Set this coordinate to the specified Point2D. This coordinate must be two-dimensional.

Parameters:
point - The new coordinate for this point.
Throws:
org.opengis.spatialschema.geometry.MismatchedDimensionException - if this coordinate point is not two-dimensional.

setLocation

public void setLocation(CoordinatePoint point)
                 throws org.opengis.spatialschema.geometry.MismatchedDimensionException
Deprecated. 
Set this coordinate to the specified CoordinatePoint.

Parameters:
point - The new coordinate for this point.
Throws:
org.opengis.spatialschema.geometry.MismatchedDimensionException - if this point doesn't have the expected dimension.

getOrdinate

public final double getOrdinate(int dimension)
Deprecated. 
Returns the ordinate value along the specified dimension. This is equivalent to ord[dimension].

Specified by:
getOrdinate in interface org.opengis.spatialschema.geometry.DirectPosition

getDimension

public final int getDimension()
Deprecated. 
The number of ordinates of a CoordinatePoint. This is equivalent to ord.length.

Specified by:
getDimension in interface org.opengis.spatialschema.geometry.DirectPosition

toPoint2D

public java.awt.geom.Point2D toPoint2D()
                                throws java.lang.IllegalStateException
Deprecated. 
Returns a Point2D with the same coordinate as this CoordinatePoint. This is a convenience method for interoperability with Java2D.

Throws:
java.lang.IllegalStateException - if this coordinate point is not two-dimensional.

hashCode

public int hashCode()
Deprecated. 
Returns a hash value for this coordinate. This value need not remain consistent between different implementations of the same class.


equals

public boolean equals(java.lang.Object object)
Deprecated. 
Compares the specified object with this coordinate for equality.


clone

public java.lang.Object clone()
Deprecated. 
Returns a deep copy of this coordinate.

Specified by:
clone in interface org.opengis.spatialschema.geometry.DirectPosition

toString

public java.lang.String toString()
Deprecated. 
Returns a string representation of this coordinate. The returned string is implementation dependent. It is usually provided for debugging purposes.



Copyright © GeoTools. All Rights Reserved.