| |
|
| java.lang.Object org.geotools.geometry.AbstractDirectPosition org.geotools.geometry.DirectPosition1D
DirectPosition1D | public class DirectPosition1D extends AbstractDirectPosition implements Serializable,Cloneable(Code) | | Holds the coordinates for a one-dimensional position within some coordinate reference system.
since: 2.0 version: $Id: DirectPosition1D.java 26137 2007-07-03 17:59:44Z desruisseaux $ author: Martin Desruisseaux See Also: DirectPosition2D See Also: GeneralPosition |
Field Summary | |
public double | ordinate The ordinate value. |
Constructor Summary | |
public | DirectPosition1D() Constructs a position initialized to (0) with a
null coordinate reference system. | public | DirectPosition1D(CoordinateReferenceSystem crs) Constructs a position with the specified coordinate reference system. | public | DirectPosition1D(double ordinate) Constructs a 1D position from the specified ordinate. | public | DirectPosition1D(DirectPosition point) Constructs a position initialized to the same values than the specified point. |
Method Summary | |
final public CoordinateReferenceSystem | getCoordinateReferenceSystem() Returns the coordinate reference system in which the coordinate is given. | public double[] | getCoordinates() Returns a sequence of numbers that hold the coordinate of this position in its
reference system. | final public int | getDimension() The length of coordinate sequence (the number of entries). | final public double | getOrdinate(int dimension) Returns the ordinate at the specified dimension.
Parameters: dimension - The dimension, which must be 0. | public int | hashCode() Returns a hash value for this coordinate. | public void | setCoordinateReferenceSystem(CoordinateReferenceSystem crs) Set the coordinate reference system in which the coordinate is given. | public void | setLocation(DirectPosition position) Set this coordinate to the specified direct position. | final public void | setOrdinate(int dimension, double value) Sets the ordinate value along the specified dimension. |
ordinate | public double ordinate(Code) | | The ordinate value.
|
DirectPosition1D | public DirectPosition1D()(Code) | | Constructs a position initialized to (0) with a
null coordinate reference system.
|
DirectPosition1D | public DirectPosition1D(CoordinateReferenceSystem crs)(Code) | | Constructs a position with the specified coordinate reference system.
|
DirectPosition1D | public DirectPosition1D(double ordinate)(Code) | | Constructs a 1D position from the specified ordinate.
|
DirectPosition1D | public DirectPosition1D(DirectPosition point)(Code) | | Constructs a position initialized to the same values than the specified point.
|
getCoordinateReferenceSystem | final public CoordinateReferenceSystem getCoordinateReferenceSystem()(Code) | | Returns the coordinate reference system in which the coordinate is given.
May be
null if this particular
DirectPosition is included
in a larger object with such a reference to a
.
The coordinate reference system, or null . |
getCoordinates | public double[] getCoordinates()(Code) | | Returns a sequence of numbers that hold the coordinate of this position in its
reference system.
The coordinates. |
getDimension | final public int getDimension()(Code) | | The length of coordinate sequence (the number of entries).
This is always 1 for DirectPosition1D objects.
The dimensionality of this position. |
getOrdinate | final public double getOrdinate(int dimension) throws IndexOutOfBoundsException(Code) | | Returns the ordinate at the specified dimension.
Parameters: dimension - The dimension, which must be 0. The . throws: IndexOutOfBoundsException - if the specified dimension is out of bounds. |
hashCode | public int hashCode()(Code) | | Returns a hash value for this coordinate.
|
setCoordinateReferenceSystem | public void setCoordinateReferenceSystem(CoordinateReferenceSystem crs)(Code) | | Set the coordinate reference system in which the coordinate is given.
Parameters: crs - The new coordinate reference system, or null . |
setLocation | public void setLocation(DirectPosition position) throws MismatchedDimensionException(Code) | | Set this coordinate to the specified direct position. If the specified position
contains a
,
then the CRS for this position will be set to the CRS of the specified position.
Parameters: position - The new position for this point. throws: MismatchedDimensionException - if this point doesn't have the expected dimension. |
setOrdinate | final public void setOrdinate(int dimension, double value) throws IndexOutOfBoundsException(Code) | | Sets the ordinate value along the specified dimension.
Parameters: dimension - The dimension, which must be 0. Parameters: value - the ordinate value. throws: IndexOutOfBoundsException - if the specified dimension is out of bounds. |
|
|
|