Class Units

Object
Units

public final class Units extends Object
A set of predefined units of measurements used by PROJ.

Units of measurement are represented by the standard Unit interface, which is implemented by external libraries. PROJ-JNI uses whichever JSR-385 implementation is found on the classpath at the time this Units class is initialized. If such implementation is found, then the constants in this class (DEGREE, METRE, SECOND, etc.) are references to Unit instances provided by that implementation. Otherwise those constants are references to an internal fallback implementation with limited capability.

Providing a JSR-385 implementation is optional but recommended if operations such as unit arithmetic (e.g. METRE.divide(SECOND)) and unit conversions (e.g. GRAD.getConverterTo(DEGREE)) are to be performed.

Since:
1.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Unit<Angle>
    Unit of measurement for angular measurements.
    static final Unit<Angle>
    Unit of measurement for angular measurements.
    static final Unit<Angle>
    Unit of measurement for angular measurements.
    static final Unit<Length>
    System unit of measurement for linear measurements.
    static final Unit<Angle>
    Unit of measurement for angular measurements equals to one millionth of RADIAN.
    static final Unit<Dimensionless>
    Unit of measurement for scale factors equals to one millionth of SCALE_UNITY.
    static final Unit<Angle>
    System unit of measurement for angular measurements.
    static final Unit<Dimensionless>
    System unit of measurement for scale factors.
    static final Unit<Time>
    System unit of measurement for temporal measurements.
    static final Unit<Time>
    Unit of measurement for temporal measurements.
  • Method Summary

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • SCALE_UNITY

      public static final Unit<Dimensionless> SCALE_UNITY
      System unit of measurement for scale factors. EPSG code is 9201.
    • PARTS_PER_MILLION

      public static final Unit<Dimensionless> PARTS_PER_MILLION
      Unit of measurement for scale factors equals to one millionth of SCALE_UNITY. EPSG code is 9202.
    • METRE

      public static final Unit<Length> METRE
      System unit of measurement for linear measurements. EPSG code is 9001.
    • RADIAN

      public static final Unit<Angle> RADIAN
      System unit of measurement for angular measurements. EPSG code is 9101.
    • MICRORADIAN

      public static final Unit<Angle> MICRORADIAN
      Unit of measurement for angular measurements equals to one millionth of RADIAN. EPSG code is 9109.
    • DEGREE

      public static final Unit<Angle> DEGREE
      Unit of measurement for angular measurements. EPSG code is 9122.
    • ARC_SECOND

      public static final Unit<Angle> ARC_SECOND
      Unit of measurement for angular measurements. EPSG code is 9104.
    • GRAD

      public static final Unit<Angle> GRAD
      Unit of measurement for angular measurements. EPSG code is 9105.
    • SECOND

      public static final Unit<Time> SECOND
      System unit of measurement for temporal measurements. EPSG code is 1040.
    • YEAR

      public static final Unit<Time> YEAR
      Unit of measurement for temporal measurements. EPSG code is 1029.