Class Coordinates<R extends CoordinateReferenceSystem<?>>
java.lang.Object
org.jscience.geography.coordinates.Coordinates<R>
- All Implemented Interfaces:
Serializable,Cloneable,javolution.lang.Immutable,javolution.lang.Realtime,javolution.lang.ValueType,javolution.xml.XMLSerializable,org.opengis.spatialschema.geometry.DirectPosition,org.opengis.spatialschema.geometry.geometry.Position,org.opengis.util.Cloneable
public abstract class Coordinates<R extends CoordinateReferenceSystem<?>>
extends Object
implements org.opengis.spatialschema.geometry.DirectPosition, javolution.lang.Realtime, javolution.lang.ValueType, javolution.xml.XMLSerializable
This class designates the position that a point occupies in a given
n-dimensional reference frame or system.
This implementation is compatible with OpenGIS® DirectPosition.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Coordinates<R>clone()OpenGIS® - Makes an exact copy of this coordinate.abstract Coordinates<?>copy()Returns a copy of these coordinatesallocatedby the calling thread (possibly on the stack).abstract RReturns the reference system for this coordinates.final double[]OpenGIS® - Returns the sequence of numbers that hold the coordinate of this position in its reference system.abstract intOpenGIS® - The length of coordinate sequence (the number of entries).abstract doublegetOrdinate(int dimension) OpenGIS® - Returns the ordinate at the specified dimension.final org.opengis.spatialschema.geometry.DirectPositionOpenGIS® - Returns the direct position for this position.final voidsetOrdinate(int dimension, double value) OpenGIS® - ThrowsUnsupportedOperationExceptionas JScience coordinates are immutable.final StringtoString()Returns the text representation of these coordinates as ajava.lang.String.javolution.text.TexttoText()Returns the string representation of this coordinates.
-
Constructor Details
-
Coordinates
protected Coordinates()Default constructor.
-
-
Method Details
-
getCoordinateReferenceSystem
Returns the reference system for this coordinates.- Specified by:
getCoordinateReferenceSystemin interfaceorg.opengis.spatialschema.geometry.DirectPosition- Returns:
- the associated coordinate reference system.
-
getDimension
public abstract int getDimension()OpenGIS® - The length of coordinate sequence (the number of entries). This is determined by the coordinate reference system.- Specified by:
getDimensionin interfaceorg.opengis.spatialschema.geometry.DirectPosition- Returns:
- the dimensionality of this position.
-
getOrdinate
OpenGIS® - Returns the ordinate at the specified dimension.- Specified by:
getOrdinatein interfaceorg.opengis.spatialschema.geometry.DirectPosition- 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
OpenGIS® - ThrowsUnsupportedOperationExceptionas JScience coordinates are immutable.- Specified by:
setOrdinatein interfaceorg.opengis.spatialschema.geometry.DirectPosition- Throws:
IndexOutOfBoundsException
-
getCoordinates
public final double[] getCoordinates()OpenGIS® - Returns the sequence of numbers that hold the coordinate of this position in its reference system.- Specified by:
getCoordinatesin interfaceorg.opengis.spatialschema.geometry.DirectPosition- Returns:
- a copy of the coordinates. Changes in the returned array will
not be reflected back in this
DirectPositionobject.
-
getPosition
public final org.opengis.spatialschema.geometry.DirectPosition getPosition()OpenGIS® - Returns the direct position for this position.- Returns:
this
-
clone
OpenGIS® - Makes an exact copy of this coordinate. -
toText
public javolution.text.Text toText()Returns the string representation of this coordinates.- Specified by:
toTextin interfacejavolution.lang.Realtime- Returns:
- the coordinates values/units.
-
toString
Returns the text representation of these coordinates as ajava.lang.String. -
copy
Returns a copy of these coordinatesallocatedby the calling thread (possibly on the stack).- Specified by:
copyin interfacejavolution.lang.ValueType- Returns:
- an identical and independant copy of these coordinates .
-