Class LatLong
java.lang.Object
org.jscience.geography.coordinates.Coordinates<GeographicCRS<?>>
org.jscience.geography.coordinates.LatLong
- 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
This class represents the
geographic
latitude/longitude
coordinates onto the WGS84 ellipsoid.- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final GeographicCRS<LatLong>
Holds the coordinate reference system for all instances of this class. -
Method Summary
Modifier and TypeMethodDescriptioncopy()
Returns a copy of these coordinatesallocated
by the calling thread (possibly on the stack).Returns the reference system for this coordinates.int
OpenGIS® - The length of coordinate sequence (the number of entries).double
getOrdinate
(int dimension) OpenGIS® - Returns the ordinate at the specified dimension.final double
latitudeValue
(Unit<Angle> unit) Returns the latitude value asdouble
final double
longitudeValue
(Unit<Angle> unit) Returns the longitude value asdouble
static LatLong
Returns the surface position corresponding to the specified coordinates.Methods inherited from class org.jscience.geography.coordinates.Coordinates
clone, getCoordinates, getPosition, setOrdinate, toString, toText
-
Field Details
-
CRS
Holds the coordinate reference system for all instances of this class.
-
-
Method Details
-
valueOf
Returns the surface position corresponding to the specified coordinates.- Parameters:
latitude
- the latitude value stated in the specified unit.longitude
- the longitude value stated in the specified unit.unit
- the angle unit in which the coordinates are stated (Degree
typically).- Returns:
- the corresponding surface position.
-
latitudeValue
Returns the latitude value asdouble
- Parameters:
unit
- the angle unit of the latitude to return.- Returns:
- the latitude stated in the specified unit.
-
longitudeValue
Returns the longitude value asdouble
- Parameters:
unit
- the angle unit of the longitude to return.- Returns:
- the longitude stated in the specified unit.
-
getCoordinateReferenceSystem
Description copied from class:Coordinates
Returns the reference system for this coordinates.- Specified by:
getCoordinateReferenceSystem
in interfaceorg.opengis.spatialschema.geometry.DirectPosition
- Specified by:
getCoordinateReferenceSystem
in classCoordinates<GeographicCRS<?>>
- Returns:
- the associated coordinate reference system.
-
getDimension
public int getDimension()Description copied from class:Coordinates
OpenGIS® - The length of coordinate sequence (the number of entries). This is determined by the coordinate reference system.- Specified by:
getDimension
in interfaceorg.opengis.spatialschema.geometry.DirectPosition
- Specified by:
getDimension
in classCoordinates<GeographicCRS<?>>
- Returns:
- the dimensionality of this position.
-
getOrdinate
Description copied from class:Coordinates
OpenGIS® - Returns the ordinate at the specified dimension.- Specified by:
getOrdinate
in interfaceorg.opengis.spatialschema.geometry.DirectPosition
- Specified by:
getOrdinate
in classCoordinates<GeographicCRS<?>>
- 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.
-
copy
Description copied from class:Coordinates
Returns a copy of these coordinatesallocated
by the calling thread (possibly on the stack).- Specified by:
copy
in interfacejavolution.lang.ValueType
- Specified by:
copy
in classCoordinates<GeographicCRS<?>>
- Returns:
- an identical and independant copy of these coordinates .
-