GeoAPI 1.0
Build 2004-05-18

org.opengis.spatialschema.geometry
Interface DirectPosition

All Superinterfaces:
Cloneable, Cloneable

public interface DirectPosition
extends Cloneable

Holds the coordinates for a position within some coordinate reference system. Since DirectPositions, as data types, will often be included in larger objects (such as geometries) that have references to CoordinateReferenceSystem, the getCoordinateReferenceSystem() method may returns null if this particular DirectPosition is included in a larger object with such a reference to a coordinate reference system. In this case, the cordinate reference system is implicitly assumed to take on the value of the containing object's CoordinateReferenceSystem.

Version:
2.0
Author:
ISO/DIS 19107, OpenGIS® consortium
UML identifier (data type): DirectPosition

Method Summary
 DirectPosition clone()
          Makes an exact copy of this coordinate.
 CoordinateReferenceSystem getCoordinateReferenceSystem()
          The coordinate reference system in which the coordinate is given.
 double[] getCoordinates()
          Returns a sequence of numbers that hold the coordinate of this position in its reference system.
 int getDimension()
          The length of coordinate sequence (the number of entries).
 double getOrdinate(int dimension)
          Returns the ordinate at the specified dimension.
 void setOrdinate(int dimension, double value)
          Sets the ordinate value along the specified dimension.
 

Method Detail

getDimension

int getDimension()
The length of coordinate sequence (the number of entries). This may be less than or equal to the dimensionality of the coordinate reference system.

Returns:
The dimensionality of this position.
UML identifier (mandatory attribute): dimension

getCoordinates

double[] getCoordinates()
Returns a sequence of numbers that hold the coordinate of this position in its reference system.

Returns:
The coordinates
UML identifier (mandatory attribute): coordinates

getOrdinate

double getOrdinate(int dimension)
                   throws IndexOutOfBoundsException
Returns the ordinate at the specified dimension.

Parameters:
dimension - The dimension in the range 0 to dimension-1.
Returns:
The coordinate at the specified dimension.
Throws:
IndexOutOfBoundsException - if the specified dimension is out of bounds.

setOrdinate

void setOrdinate(int dimension,
                 double value)
                 throws IndexOutOfBoundsException
Sets the ordinate value along the specified dimension.

Parameters:
dimension - the dimension for the ordinate of interest.
value - the ordinate value of interest.
Throws:
IndexOutOfBoundsException - if the specified dimension is out of bounds.

getCoordinateReferenceSystem

CoordinateReferenceSystem getCoordinateReferenceSystem()
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 coordinate reference system. In this case, the cordinate reference system is implicitly assumed to take on the value of the containing object's coordinate reference system.

Returns:
The coordinate reference system, or null.
UML identifier (association): coordinateReferenceSystem

clone

DirectPosition clone()
Makes an exact copy of this coordinate.

Specified by:
clone in interface Cloneable
Returns:
A clone of this instance.
See Also:
Object.clone()

GeoAPI 1.0
Build 2004-05-18

Symbols, terms and definitions
Copyright OpenGIS® Consortium