Class LatLong

  • 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 LatLong
    extends Coordinates<GeographicCRS<?>>
    This class represents the geographic latitude/longitude coordinates onto the WGS84 ellipsoid.
    Version:
    3.0, February 13, 2006
    Author:
    Jean-Marie Dautelle
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static GeographicCRS<LatLong> CRS
      Holds the coordinate reference system for all instances of this class.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      LatLong copy()
      Returns a copy of these coordinates allocated by the calling thread (possibly on the stack).
      GeographicCRS<LatLong> getCoordinateReferenceSystem()
      Returns the reference system for this coordinates.
      int getDimension()
      OpenGIS® - The length of coordinate sequence (the number of entries).
      double getOrdinate​(int dimension)
      OpenGIS® - Returns the ordinate at the specified dimension.
      double latitudeValue​(javax.measure.unit.Unit<javax.measure.quantity.Angle> unit)
      Returns the latitude value as double
      double longitudeValue​(javax.measure.unit.Unit<javax.measure.quantity.Angle> unit)
      Returns the longitude value as double
      static LatLong valueOf​(double latitude, double longitude, javax.measure.unit.Unit<javax.measure.quantity.Angle> unit)
      Returns the surface position corresponding to the specified coordinates.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • CRS

        public static final GeographicCRS<LatLong> CRS
        Holds the coordinate reference system for all instances of this class.
    • Method Detail

      • valueOf

        public static LatLong valueOf​(double latitude,
                                      double longitude,
                                      javax.measure.unit.Unit<javax.measure.quantity.Angle> unit)
        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

        public final double latitudeValue​(javax.measure.unit.Unit<javax.measure.quantity.Angle> unit)
        Returns the latitude value as double
        Parameters:
        unit - the angle unit of the latitude to return.
        Returns:
        the latitude stated in the specified unit.
      • longitudeValue

        public final double longitudeValue​(javax.measure.unit.Unit<javax.measure.quantity.Angle> unit)
        Returns the longitude value as double
        Parameters:
        unit - the angle unit of the longitude to return.
        Returns:
        the longitude stated in the specified unit.
      • getOrdinate

        public double getOrdinate​(int dimension)
                           throws java.lang.IndexOutOfBoundsException
        Description copied from class: Coordinates
        OpenGIS® - Returns the ordinate at the specified dimension.
        Specified by:
        getOrdinate in interface org.opengis.spatialschema.geometry.DirectPosition
        Specified by:
        getOrdinate in class Coordinates<GeographicCRS<?>>
        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 LatLong copy()
        Description copied from class: Coordinates
        Returns a copy of these coordinates allocated by the calling thread (possibly on the stack).
        Specified by:
        copy in interface javolution.lang.ValueType
        Specified by:
        copy in class Coordinates<GeographicCRS<?>>
        Returns:
        an identical and independant copy of these coordinates .