GeoAPI 2.0
Build 2005-06-08

org.opengis.spatialschema.geometry
Interface DirectPosition

All Superinterfaces:
Cloneable, Position

@UML(identifier="DirectPosition",
     specification=ISO_19107)
public interface DirectPosition
extends Position, 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.

Since:
GeoAPI 1.0
Version:
Abstract specification 5

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 the 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.
 
Methods inherited from interface Position
getPosition
 

Method Detail

getDimension

@UML(identifier="dimension",
     obligation=MANDATORY,
     specification=ISO_19107)
int getDimension()
The length of coordinate sequence (the number of entries). This is determined by the coordinate reference system.

Returns:
The dimensionality of this position.

getCoordinates

@UML(identifier="coordinates",
     obligation=MANDATORY,
     specification=ISO_19107)
double[] getCoordinates()
Returns the sequence of numbers that hold the coordinate of this position in its reference system.

Returns:
A copy of the coordinates. Changes in the returned array will not be reflected back in this DirectPosition object.

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

@UML(identifier="coordinateReferenceSystem",
     obligation=MANDATORY,
     specification=ISO_19107)
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.

clone

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


GeoAPI 2.0
Build 2005-06-08

Symbols, terms and definitions
Copyright OpenGIS® Consortium