Class CompoundCoordinates<C1 extends Coordinates<?>,C2 extends Coordinates<?>>
- java.lang.Object
-
- org.jscience.geography.coordinates.Coordinates<CompoundCRS<C1,C2>>
-
- org.jscience.geography.coordinates.CompoundCoordinates<C1,C2>
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.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 final class CompoundCoordinates<C1 extends Coordinates<?>,C2 extends Coordinates<?>> extends Coordinates<CompoundCRS<C1,C2>>
This class represents a coordinates made up by combining two coordinates objects together.- Version:
- 3.0, February 13, 2006
- Author:
- Jean-Marie Dautelle
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CompoundCoordinates<?,?>copy()Returns a copy of these coordinatesallocatedby the calling thread (possibly on the stack).CompoundCRS<C1,C2>getCoordinateReferenceSystem()Returns the reference system for this coordinates.intgetDimension()OpenGIS® - The length of coordinate sequence (the number of entries).C1getFirst()Returns the first coordinates.C2getNext()Returns the next coordinates.doublegetOrdinate(int dimension)OpenGIS® - Returns the ordinate at the specified dimension.static <T1 extends Coordinates<?>,T2 extends Coordinates<?>>
CompoundCoordinates<T1,T2>valueOf(T1 first, T2 next)Returns a compound coordinates made up of the specified coordinates.-
Methods inherited from class org.jscience.geography.coordinates.Coordinates
clone, getCoordinates, getPosition, setOrdinate, toString, toText
-
-
-
-
Method Detail
-
valueOf
public static <T1 extends Coordinates<?>,T2 extends Coordinates<?>> CompoundCoordinates<T1,T2> valueOf(T1 first, T2 next)
Returns a compound coordinates made up of the specified coordinates.- Parameters:
first- the first coordinates.next- the next coordinates.
-
getCoordinateReferenceSystem
public CompoundCRS<C1,C2> getCoordinateReferenceSystem()
Description copied from class:CoordinatesReturns the reference system for this coordinates.- Specified by:
getCoordinateReferenceSystemin interfaceorg.opengis.spatialschema.geometry.DirectPosition- Specified by:
getCoordinateReferenceSystemin classCoordinates<CompoundCRS<C1 extends Coordinates<?>,C2 extends Coordinates<?>>>- Returns:
- the associated coordinate reference system.
-
getDimension
public int getDimension()
Description copied from class:CoordinatesOpenGIS® - 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- Specified by:
getDimensionin classCoordinates<CompoundCRS<C1 extends Coordinates<?>,C2 extends Coordinates<?>>>- Returns:
- the dimensionality of this position.
-
getOrdinate
public double getOrdinate(int dimension) throws java.lang.IndexOutOfBoundsException
Description copied from class:CoordinatesOpenGIS® - Returns the ordinate at the specified dimension.- Specified by:
getOrdinatein interfaceorg.opengis.spatialschema.geometry.DirectPosition- Specified by:
getOrdinatein classCoordinates<CompoundCRS<C1 extends Coordinates<?>,C2 extends Coordinates<?>>>- Parameters:
dimension- The dimension in the range 0 to dimension-1.- Returns:
- The coordinate at the specified dimension.
- Throws:
java.lang.IndexOutOfBoundsException- if the specified dimension is out of bounds.
-
copy
public CompoundCoordinates<?,?> copy()
Description copied from class:CoordinatesReturns a copy of these coordinatesallocatedby the calling thread (possibly on the stack).- Specified by:
copyin interfacejavolution.lang.ValueType- Specified by:
copyin classCoordinates<CompoundCRS<C1 extends Coordinates<?>,C2 extends Coordinates<?>>>- Returns:
- an identical and independant copy of these coordinates .
-
-