Class XYZ

  • 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 XYZ
    extends Coordinates<GeocentricCRS<XYZ>>
    This class represents the geocentric Earth-Centered, Earth-Fixed (ECEF) cartesian coordinates used in GPS/GLONASS.
    Version:
    3.0, February 18, 2006
    Author:
    Paul D. Anderson
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static GeocentricCRS<XYZ> 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
      XYZ copy()
      Returns a copy of these coordinates allocated by the calling thread (possibly on the stack).
      GeocentricCRS<XYZ> 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.
      Float64Vector toVector​(javax.measure.unit.Unit<javax.measure.quantity.Length> unit)
      Returns the x/y/z coordinates value as a 3-dimensional vector.
      static XYZ valueOf​(double x, double y, double z, javax.measure.unit.Unit<javax.measure.quantity.Length> unit)
      Returns the spatial position corresponding to the specified coordinates.
      static XYZ valueOf​(Float64Vector vector, javax.measure.unit.Unit<javax.measure.quantity.Length> unit)
      Returns the spatial position corresponding to the specified 3-dimensional vector.
      double xValue​(javax.measure.unit.Unit<javax.measure.quantity.Length> unit)
      Returns the x coordinate value as double
      double yValue​(javax.measure.unit.Unit<javax.measure.quantity.Length> unit)
      Returns the y coordinate value as double
      double zValue​(javax.measure.unit.Unit<javax.measure.quantity.Length> unit)
      Returns the z coordinate value as double
      • Methods inherited from class java.lang.Object

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

      • CRS

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

      • valueOf

        public static XYZ valueOf​(double x,
                                  double y,
                                  double z,
                                  javax.measure.unit.Unit<javax.measure.quantity.Length> unit)
        Returns the spatial position corresponding to the specified coordinates.
        Parameters:
        x - the x value stated in the specified unit.
        y - the y value stated in the specified unit.
        z - the z value stated in the specified unit.
        unit - the length unit in which the coordinates are stated.
        Returns:
        the corresponding 3D position.
      • valueOf

        public static XYZ valueOf​(Float64Vector vector,
                                  javax.measure.unit.Unit<javax.measure.quantity.Length> unit)
        Returns the spatial position corresponding to the specified 3-dimensional vector.
        Parameters:
        vector - the 3-dimensional vector holding the x/y/z coordinates.
        unit - the length unit in which the coordinates are stated.
        Returns:
        the corresponding 3D position.
      • xValue

        public double xValue​(javax.measure.unit.Unit<javax.measure.quantity.Length> unit)
        Returns the x coordinate value as double
        Parameters:
        unit - the length unit of the x coordinate value to return.
        Returns:
        the x coordinate stated in the specified unit.
      • yValue

        public double yValue​(javax.measure.unit.Unit<javax.measure.quantity.Length> unit)
        Returns the y coordinate value as double
        Parameters:
        unit - the length unit of the x coordinate value to return.
        Returns:
        the z coordinate stated in the specified unit.
      • zValue

        public double zValue​(javax.measure.unit.Unit<javax.measure.quantity.Length> unit)
        Returns the z coordinate value as double
        Parameters:
        unit - the length unit of the x coordinate value to return.
        Returns:
        the z coordinate stated in the specified unit.
      • toVector

        public Float64Vector toVector​(javax.measure.unit.Unit<javax.measure.quantity.Length> unit)
        Returns the x/y/z coordinates value as a 3-dimensional vector.
        Parameters:
        unit - the length unit of the vector coordinates.
        Returns:
        a vector holding the x/y/z coordinates 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<GeocentricCRS<XYZ>>
        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 XYZ 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<GeocentricCRS<XYZ>>
        Returns:
        an identical and independant copy of these coordinates .