Class Units

    • Field Detail

      • NAUTICAL_MILE

        public static final Unit<Length> NAUTICAL_MILE
        Unit of measurement defined as exactly 1852 metres (1 M). This is approximately the distance between two parallels of latitude separated by one arc-minute. The system unit is METRE, the unlocalized name is “nautical mile” and the identifier is EPSG:9030.

        There is no internationally agreed symbol for nautical mile. Apache SIS uses “M” in agreement with the International Hydrographic Organization (IHO) and the International Bureau of Weights and Measures (BIPM). But “NM” and “nmi” are also in use.

        Related units
        SI length units: NANOMETRE, MILLIMETRE, CENTIMETRE, METRE, KILOMETRE.
        In other systems: POINT, INCH, FOOT, CLARKE_FOOT, US_SURVEY_FOOT, STATUTE_MILE, NAUTICAL_MILE.
        Derived units: SQUARE_METRE, CUBIC_METRE, KILOMETRES_PER_HOUR.
        Since:
        0.8
      • SQUARE_METRE

        public static final Unit<Area> SQUARE_METRE
        The SI derived unit for area (m²). The unlocalized name is “square metre”.
        Related units
        SI area units: SQUARE_METRE, HECTARE.
        Derived units: CUBIC_METRE.
        Since:
        0.8
      • HECTARE

        public static final Unit<Area> HECTARE
        Unit of measurement defined as 10,000 square metres (1 ha). One hectare is exactly equals to one hectometre (1 hm²). While not an SI unit, the hectare is often used in the measurement of land. The unlocalized name is “hectare”.
        Related units
        SI area units: SQUARE_METRE, HECTARE.
        Derived units: CUBIC_METRE.
        Since:
        0.8
      • CUBIC_METRE

        public static final Unit<Volume> CUBIC_METRE
        The SI derived unit for volume (m³). The unlocalized name is “cubic metre”.
        Since:
        0.8
      • LITRE

        public static final Unit<Volume> LITRE
        The unit for litre volume (L, l or ℓ). The unlocalized name is “litre”.
        Since:
        0.8
      • STERADIAN

        public static final Unit<SolidAngle> STERADIAN
        The SI unit for solid angles (sr). The unlocalized name is “steradian”.
        Since:
        0.8
      • MICRORADIAN

        public static final Unit<Angle> MICRORADIAN
        Unit of measurement defined as 10-6 radians (1 µrad). The distance of one microradian of latitude on Earth is approximately 2 millimetres. The system unit is RADIAN, the unlocalized name is “microradian” and the identifier is EPSG:9109.
        Related units
        SI angle units: MICRORADIAN, RADIAN.
        In other systems: DEGREE, ARC_MINUTE, ARC_SECOND, GRAD.
        Derived units: STERADIAN.
        Since:
        0.8
      • DEGREE

        public static final Unit<Angle> DEGREE
        Unit of measurement defined as π/180 radians (1°). There is 360° in a circle. The system unit is RADIAN, the unlocalized name is “degree” and the identifier is EPSG:9102.
        Related units
        SI angle units: MICRORADIAN, RADIAN.
        In other systems: DEGREE, ARC_MINUTE, ARC_SECOND, GRAD.
        Derived units: STERADIAN.
        Since:
        0.8
      • ARC_MINUTE

        public static final Unit<Angle> ARC_MINUTE
        Unit of measurement defined as 1/60 degree (1′). The distance of one arc-minute of latitude on Earth is approximately 1852 metres (one nautical mile). The system unit is RADIAN, the unlocalized name is “arc-minute” and the identifier is EPSG:9103.
        Related units
        SI angle units: MICRORADIAN, RADIAN.
        In other systems: DEGREE, ARC_MINUTE, ARC_SECOND, GRAD.
        Derived units: STERADIAN.
        Since:
        0.8
      • ARC_SECOND

        public static final Unit<Angle> ARC_SECOND
        Unit of measurement defined as 1/(60×60) degree (1″). The distance of one arc-second of latitude on Earth is approximately 31 metres. This unit of measurement is used for rotation terms in Bursa-Wolf parameters. The system unit is RADIAN, the unlocalized name is “arc-second” and the identifier is EPSG:9104.
        Related units
        SI angle units: MICRORADIAN, RADIAN.
        In other systems: DEGREE, ARC_MINUTE, ARC_SECOND, GRAD.
        Derived units: STERADIAN.
        Since:
        0.8
      • GRAD

        public static final Unit<Angle> GRAD
        Unit of measurement defined as π/200 radians (1 grad). There is 400 grads in a circle. The system unit is RADIAN, the unlocalized name is “grad”, but the “gon” alias is also accepted. The identifier is EPSG:9105.
        Related units
        SI angle units: MICRORADIAN, RADIAN.
        In other systems: DEGREE, ARC_MINUTE, ARC_SECOND, GRAD.
        Derived units: STERADIAN.
        Since:
        0.8
      • TROPICAL_YEAR

        public static final Unit<Time> TROPICAL_YEAR
        Unit of measurement approximately equals to 365.24219 days (1 a). This is defined by the International Union of Geological Sciences (IUGS) as exactly 31556925.445 seconds, taken as the length of the tropical year in the the year 2000. The system unit is SECOND, the unlocalized name is “year” and the identifier is EPSG:1029.
        Related units
        SI time units: MILLISECOND, SECOND.
        In other systems: MINUTE, HOUR, DAY, WEEK, TROPICAL_YEAR.
        Derived units: KILOMETRES_PER_HOUR, HERTZ.
        Since:
        0.8
      • HERTZ

        public static final Unit<Frequency> HERTZ
        The SI derived unit for frequency (Hz). One hertz is equal to one cycle per second. The unlocalized name is “hertz”.
        Related units
        Components:SECOND-1
        Since:
        0.8
      • RADIANS_PER_SECOND

        public static final Unit<AngularVelocity> RADIANS_PER_SECOND
        The unit for angular velocity (rad/s). The identifier is EPSG:1035.
        Related units
        Components: RADIANSECOND
        Since:
        0.8
      • METRES_PER_SECOND

        public static final Unit<Speed> METRES_PER_SECOND
        The SI derived unit for speed (m/s). The unlocalized name is “metres per second” and the identifier is EPSG:1026.
        Related units
        SI speed units: METRES_PER_SECOND.
        In other systems: KILOMETRES_PER_HOUR.
        Components: METRESECOND
        Since:
        0.8
      • KILOMETRES_PER_HOUR

        public static final Unit<Speed> KILOMETRES_PER_HOUR
        Unit of measurement defined as 1/3.6 metres per second (1 km/h). The system unit is METRES_PER_SECOND and the unlocalized name is “kilometres per hour”.
        Related units
        SI speed units: METRES_PER_SECOND.
        In other systems: KILOMETRES_PER_HOUR.
        Components: KILOMETREHOUR
        Since:
        0.8
      • PASCAL

        public static final Unit<Pressure> PASCAL
        The SI derived unit for pressure (Pa). One pascal is equal to 1 N/m². Pressures are often used in parametric CRS for height measurements on a vertical axis. The unlocalized name is “pascal”.
        Related units
        SI pressure units: PASCAL, HECTOPASCAL.
        In other systems: DECIBAR, BAR, ATMOSPHERE.
        Components: NEWTONSQUARE_METRE
        Since:
        0.8
      • HECTOPASCAL

        public static final Unit<Pressure> HECTOPASCAL
        Unit of measurement defined as 100 pascals (1 hPa). The hectopascal is the international unit for measuring atmospheric or barometric pressure and is exactly equal to one millibar. The system unit is PASCAL and the unlocalized name is “hectopascal”.
        Related units
        SI pressure units: PASCAL, HECTOPASCAL.
        In other systems: DECIBAR, BAR, ATMOSPHERE.
        Components: NEWTONSQUARE_METRE
        Since:
        0.8
      • DECIBAR

        public static final Unit<Pressure> DECIBAR
        Unit of measurement defined as 10000 pascals (1 dbar). This unit is used in oceanography as there is an approximate numerical equivalence between pressure changes in decibars and depth changes in metres underwater. The system unit is PASCAL and the unlocalized name is “decibar”.
        Related units
        SI pressure units: PASCAL, HECTOPASCAL.
        In other systems: DECIBAR, BAR, ATMOSPHERE.
        Components: NEWTONSQUARE_METRE
        Since:
        0.8
      • BAR

        public static final Unit<Pressure> BAR
        Unit of measurement defined as 100000 pascals (1 bar). One bar is slightly less than the average atmospheric pressure on Earth at sea level. One millibar is exactly equal to one hectopascal. The system unit is PASCAL and the unlocalized name is “bar”.
        Related units
        SI pressure units: PASCAL, HECTOPASCAL.
        In other systems: DECIBAR, BAR, ATMOSPHERE.
        Components: NEWTONSQUARE_METRE
        Since:
        0.8
      • ATMOSPHERE

        public static final Unit<Pressure> ATMOSPHERE
        Unit of measurement defined as 101325 pascals (1 atm). One atmosphere reflects the pressure at the mean sea level for countries around 49°N of latitude. The system unit is PASCAL and the unlocalized name is “atmosphere”.
        Related units
        SI pressure units: PASCAL, HECTOPASCAL.
        In other systems: DECIBAR, BAR, ATMOSPHERE.
        Components: NEWTONSQUARE_METRE
        Since:
        0.8
      • NEWTON

        public static final Unit<Force> NEWTON
        The SI derived unit for force (N). One newton is the force required to give a mass of 1 kg an acceleration of 1 m/s². The unlocalized name is “newton”.
        Related units
        Components: KILOGRAMMETRES_PER_SECONDSECOND
        Derived units: PASCAL, JOULE, WATT.
        Since:
        0.8
      • JOULE

        public static final Unit<Energy> JOULE
        The SI derived unit for energy (J). The unlocalized name is “joule”.
        Related units
        Components: NEWTONMETRE
        Derived units: WATT.
        Since:
        0.8
      • WATT

        public static final Unit<Power> WATT
        The SI derived unit for power (W). One watt is equal to one joule per second. The unlocalized name is “watt”.
        Related units
        Components: JOULESECOND
        Derived units: VOLT.
        Since:
        0.8
      • COULOMB

        public static final Unit<ElectricCharge> COULOMB
        The SI derived unit for electric charge (C). One coulomb is the charge transfered by a current of one ampere during one second. The unlocalized name is “coulomb”.
        Related units
        Components: AMPERESECOND
        Derived units: FARAD.
        Since:
        0.8
      • FARAD

        public static final Unit<ElectricCapacitance> FARAD
        The SI derived unit for electric capacitance (F). The unlocalized name is “farad”.
        Related units
        Components: COULOMBVOLT
        Since:
        0.8
      • OHM

        public static final Unit<ElectricResistance> OHM
        The SI derived unit for electric resistance (Ω). This is the inverse of electric conductance. The unlocalized name is “ohm”.
        Related units
        Components: VOLTAMPERE
        Derived units: SIEMENS.
        Since:
        0.8
      • SIEMENS

        public static final Unit<ElectricConductance> SIEMENS
        The SI derived unit for electric conductance (S). This is the inverse of electric resistance. The unlocalized name is “siemens”.
        Related units
        Components: AMPEREVOLT
        Derived units: OHM.
        Since:
        0.8
      • WEBER

        public static final Unit<MagneticFlux> WEBER
        The SI derived unit for magnetic flux (Wb). The unlocalized name is “weber”.
        Related units
        Components: VOLTSECOND
        Derived units: TESLA, HENRY.
        Since:
        0.8
      • TESLA

        public static final Unit<MagneticFluxDensity> TESLA
        The SI derived unit for magnetic flux density (T). The unlocalized name is “tesla”.
        Related units
        Components: WEBERSQUARE_METRE
        Since:
        0.8
      • HENRY

        public static final Unit<ElectricInductance> HENRY
        The SI derived unit for inductance (H). The unlocalized name is “henry”.
        Related units
        Components: WEBERAMPERE
        Since:
        0.8
      • KELVIN

        public static final Unit<Temperature> KELVIN
        The SI base unit for thermodynamic temperature (K). The unlocalized name is “kelvin”.
        Related units
        SI temperature units: KELVIN.
        In other systems: CELSIUS, FAHRENHEIT.
        Since:
        0.8
      • CELSIUS

        public static final Unit<Temperature> CELSIUS
        Unit of measurement defined as the temperature in Kelvin minus 273.15. The symbol is °C and the unlocalized name is “Celsius”. Note that this is the only SI unit with an upper-case letter in its name.
        Related units
        SI temperature units: KELVIN.
        In other systems: CELSIUS, FAHRENHEIT.
        Since:
        0.8
      • FAHRENHEIT

        public static final Unit<Temperature> FAHRENHEIT
        Unit of measurement defined as 1.8 degree Celsius plus 32. The symbol is °F and the unlocalized name is “Fahrenheit” (note the upper-case "F" letter).
        Related units
        SI temperature units: KELVIN.
        In other systems: CELSIUS, FAHRENHEIT.
        Since:
        0.8
      • CANDELA

        public static final Unit<LuminousIntensity> CANDELA
        The SI base unit for luminous intensity (cd). The unlocalized name is “candela”.
        Related units
        Derived units: LUMEN, LUX.
        Since:
        0.8
      • LUMEN

        public static final Unit<LuminousFlux> LUMEN
        The SI derived unit for luminous flux (lm). The unlocalized name is “lumen”.
        Related units
        Components: CANDELASTERADIAN
        Derived units: LUX.
        Since:
        0.8
      • LUX

        public static final Unit<Illuminance> LUX
        The SI derived unit for illuminance (lx). The unlocalized name is “lux”.
        Related units
        Components: LUXSQUARE_METRE
        Since:
        0.8
      • GRAM

        public static final Unit<Mass> GRAM
        A SI conventional unit for mass (g). The unlocalized name is “gram”.
        Since:
        0.8
      • KILOGRAM

        public static final Unit<Mass> KILOGRAM
        The SI base unit for mass (kg). The unlocalized name is “kilogram”.
        Since:
        0.8
      • MOLE

        public static final Unit<AmountOfSubstance> MOLE
        The SI base unit for amount of substance (mol). The unlocalized name is “mole”.
        Since:
        0.8
      • UNITY

        public static final Unit<Dimensionless> UNITY
        The base dimensionless unit for scale measurements. The unlocalized name is “unity” and the identifier is EPSG:9201. This is the base of all other scale units: PERCENT (%), PPM (ppm) and PIXEL (px) among others.
        Since:
        0.8
      • PERCENT

        public static final Unit<Dimensionless> PERCENT
        Dimensionless unit for percentages (%). The system unit is UNITY and the unlocalized name is “percentage”.
        Since:
        0.8
        See Also:
        UNITY, PPM
      • PPM

        public static final Unit<Dimensionless> PPM
        Dimensionless unit for parts per million (ppm). The system unit is UNITY, the unlocalized name is “parts per million” and the identifier is EPSG:9202.
        Since:
        0.3
        See Also:
        UNITY, PERCENT
      • DECIBEL

        public static final Unit<Dimensionless> DECIBEL
        Sub-division of logarithm of ratio of the measured quantity to a reference quantity (dB).
        Since:
        1.0
      • PSU

        public static final Unit<Salinity> PSU
        Salinity measured using PSS-78. While this is a dimensionless measurement, the "psu" symbol is sometime added to PSS-78 measurement. However this is officially discouraged.
        Since:
        0.8
      • PIXEL

        public static final Unit<Dimensionless> PIXEL
        Dimensionless unit for pixels (px). The unlocalized name is “pixel”. This unity should not be confused with POINT, which is approximately equal to 1/72 of inch.
        See Also:
        POINT
    • Method Detail

      • isAngular

        public static boolean isAngular​(Unit<?> unit)
        Returns true if the given unit is a linear unit. Linear units are convertible to DEGREE.

        Angular units are dimensionless, which may be a cause of confusion with other dimensionless units like UNITY or PPM. This method take care of differentiating angular units from other dimensionless units.

        Parameters:
        unit - the unit to check (may be null).
        Returns:
        true if the given unit is non-null and angular.
        See Also:
        ensure­Angular(Unit)
      • isLinear

        public static boolean isLinear​(Unit<?> unit)
        Returns true if the given unit is a linear unit. Linear units are convertible to METRE.
        Parameters:
        unit - the unit to check (may be null).
        Returns:
        true if the given unit is non-null and linear.
        See Also:
        METRE, ensure­Linear(Unit)
      • isPressure

        public static boolean isPressure​(Unit<?> unit)
        Returns true if the given unit is a pressure unit. Pressure units are convertible to PASCAL. Those units are sometime used instead of linear units for altitude measurements.
        Parameters:
        unit - the unit to check (may be null).
        Returns:
        true if the given unit is non-null and a pressure unit.
      • isTemporal

        public static boolean isTemporal​(Unit<?> unit)
        Returns true if the given unit is a temporal unit. Temporal units are convertible to SECOND.
        Parameters:
        unit - the unit to check (may be null).
        Returns:
        true if the given unit is non-null and temporal.
        See Also:
        ensure­Temporal(Unit)
      • isScale

        public static boolean isScale​(Unit<?> unit)
        Returns true if the given unit is a dimensionless scale unit. This include UNITY and PPM.
        Parameters:
        unit - the unit to check (may be null).
        Returns:
        true if the given unit is non-null and a dimensionless scale.
        See Also:
        UNITY, ensure­Scale(Unit)
      • ensureAngular

        public static Unit<Angle> ensureAngular​(Unit<?> unit)
                                         throws IllegalArgumentException
        Makes sure that the specified unit is either null or an angular unit. This method is used for argument checks in constructors and setter methods.
        Parameters:
        unit - the unit to check, or null if none.
        Returns:
        the given unit argument, which may be null.
        Throws:
        Illegal­Argument­Exception - if unit is non-null and not an angular unit.
        See Also:
        is­Angular(Unit)
      • ensureLinear

        public static Unit<Length> ensureLinear​(Unit<?> unit)
                                         throws IllegalArgumentException
        Makes sure that the specified unit is either null or a linear unit. This method is used for argument checks in constructors and setter methods.
        Parameters:
        unit - the unit to check, or null if none.
        Returns:
        the given unit argument, which may be null.
        Throws:
        Illegal­Argument­Exception - if unit is non-null and not a linear unit.
        See Also:
        is­Linear(Unit)
      • ensureTemporal

        public static Unit<Time> ensureTemporal​(Unit<?> unit)
                                         throws IllegalArgumentException
        Makes sure that the specified unit is either null or a temporal unit. This method is used for argument checks in constructors and setter methods.
        Parameters:
        unit - the unit to check, or null if none.
        Returns:
        the given unit argument, which may be null.
        Throws:
        Illegal­Argument­Exception - if unit is non-null and not a temporal unit.
        See Also:
        is­Temporal(Unit)
      • ensureScale

        public static Unit<Dimensionless> ensureScale​(Unit<?> unit)
                                               throws IllegalArgumentException
        Makes sure that the specified unit is either null or a scale unit. This method is used for argument checks in constructors and setter methods.
        Parameters:
        unit - the unit to check, or null if none.
        Returns:
        the given unit argument, which may be null.
        Throws:
        Illegal­Argument­Exception - if unit is non-null and not a scale unit.
        See Also:
        is­Scale(Unit)
      • multiply

        public static <Q extends Quantity<Q>> Unit<Q> multiply​(Unit<Q> unit,
                                                               double numerator,
                                                               double denominator)
        Multiplies the given unit by the given ratio. For example multiplying CENTIMETRE by 254/100 gives INCH. Invoking this method is equivalent to invoking Unit​.multiply(numerator / denominator) except that the use of a ration of integer values help Apache SIS to improve accuracy when more than one arithmetic operation are chained.
        Type Parameters:
        Q - the quantity measured by the unit.
        Parameters:
        unit - the unit to multiply.
        numerator - the numerator of the multiplication factor.
        denominator - the denominator of the multiplication factor.
        Returns:
        the unit multiplied by the given factor.
        Since:
        0.8
      • toStandardUnit

        public static <Q extends Quantity<Q>> double toStandardUnit​(Unit<Q> unit)
        Returns the factor by which to multiply the standard unit in order to get the given unit. The "standard" unit is usually the SI unit on which the given unit is based, as given by Unit​.get­System­Unit().
        Example: if the given unit is KILOMETRE, then this method returns 1000 since a measurement in kilometres must be multiplied by 1000 in order to give the equivalent measurement in the "standard" units (here METRE).
        If the given unit is null or if the conversion to the "standard" unit can not be expressed by a single multiplication factor, then this method returns Double​.Na­N.
        Type Parameters:
        Q - the quantity measured by the unit, or null.
        Parameters:
        unit - the unit for which we want the multiplication factor to standard unit, or null.
        Returns:
        the factor by which to multiply a measurement in the given unit in order to get an equivalent measurement in the standard unit, or NaN if the conversion can not be expressed by a scale factor.
      • converter

        public static UnitConverter converter​(Number scale,
                                              Number offset)
        Creates a linear converter from the given scale and offset.
        Parameters:
        scale - the scale factor, or null if none (default value of 1).
        offset - the offset, or null if none (default value of 0).
        Returns:
        a converter for the given scale and offset.
        Since:
        1.0
        See Also:
        org​.apache​.sis​.referencing​.operation​.transform​.Math­Transforms#linear(double, double)
      • coefficients

        public static Number[] coefficients​(UnitConverter converter)
        Returns the coefficients of the given converter expressed as a polynomial equation. This method returns the first of the following choices that apply:
        • If the given converter is identity, returns an empty array.
        • If the given converter shifts the values without scaling them (for example the conversion from Kelvin to Celsius degrees), returns an array of length 1 containing only the offset.
        • If the given converter scales the values (optionally in addition to shifting them), returns an array of length 2 containing the offset and scale factor, in that order.
        This method returns null if it can not get the polynomial equation coefficients from the given converter.
        Parameters:
        converter - the converter from which to get the coefficients of the polynomial equation, or null.
        Returns:
        the polynomial equation coefficients (may be any length, including zero), or null if the given converter is null or if this method can not get the coefficients.
        Since:
        0.8
      • derivative

        public static double derivative​(UnitConverter converter,
                                        double value)
        Returns the derivative of the given converter at the given value, or Na­N if this method can not compute it.
        Parameters:
        converter - the converter for which we want the derivative at a given point, or null.
        value - the point at which to compute the derivative.
        Returns:
        the derivative at the given point, or Na­N if unknown.
        See Also:
        org​.apache​.sis​.referencing​.operation​.transform​.Abstract­Math­Transform#derivative(Direct­Position)
      • valueOf

        public static Unit<?> valueOf​(String uom)
                               throws ParserException
        Parses the given symbol. Invoking this method is equivalent to invoking Unit­Format​.parse(Char­Sequence) on a shared locale-independent instance. This method is capable to handle some symbols found during WKT parsing or in XML files. The list of symbols supported by this method is implementation-dependent and may change in future SIS versions.
        Parsing authority codes
        As a special case, if the given uom arguments is of the form "EPSG:####" or "urn:ogc:def:uom:EPSG:####" (ignoring case and whitespaces), then "####" is parsed as an integer and forwarded to the value­Of­EPSG(int) method.
        NetCDF unit symbols
        The attributes in netCDF files often merge the axis direction with the angular unit, as in "degrees_east" or "degrees_north". This value­Of method ignores those suffixes and unconditionally returns DEGREE for all axis directions. In particular, the units for "degrees_west" and "degrees_east" do not have opposite sign. It is caller responsibility to handle the direction of axes associated to netCDF units.
        Parameters:
        uom - the symbol to parse, or null.
        Returns:
        the parsed symbol, or null if uom was null.
        Throws:
        Parser­Exception - if the given symbol can not be parsed.
        See Also:
        Unit­Format​.parse(Char­Sequence)
      • valueOfEPSG

        public static Unit<?> valueOfEPSG​(int code)
        Returns a hard-coded unit from an EPSG code. The code argument given to this method shall be a code identifying a record in the "Unit of Measure" table of the EPSG geodetic dataset. If this method does not recognize the given code, then it returns null.

        The list of units recognized by this method is not exhaustive. This method recognizes the base units declared in the TARGET_UOM_CODE column of the above-cited table, and some frequently-used units. The list of recognized units may be updated in any future version of SIS.

        The org​.apache​.sis​.referencing​.factory​.sql​.EPSGData­Access class uses this method for fetching the base units, and derives automatically other units from the information found in the EPSG database. This method is also used by other classes not directly related to the EPSG database, like org​.apache​.sis​.referencing​.factory​.Common­Authority­Factory which uses EPSG codes for identifying units.

        The currently recognized values are:

        EPSG codes for units
        Angular units
        CodeUnit
        9101radian
        9102decimal degree
        9103minute
        9104second
        9105grad
        9107degree-minute-second
        9108degree-minute-second
        9109microradian
        9110sexagesimal degree-minute-second
        9111sexagesimal degree-minute
        9122decimal degree
        Linear units
        CodeUnit
        1025millimetre
        1033centimetre
        9001metre
        9002foot
        9003US survey foot
        9030nautical mile
        9036kilometre
        9093statute mile
        Time units
        CodeUnit
        1029year
        1040second
        Scale units
        CodeUnit
        9201unity
        9202parts per million
        9203unity
        Note: EPSG uses code 9102 (degree) for prime meridian and coordinate operation parameters, and code 9122 (degree (supplier to define representation)) for coordinate system axes. But Apache SIS considers those two codes as synonymous.
        Parameters:
        code - the EPSG code for a unit of measurement.
        Returns:
        the unit, or null if the code is unrecognized.
        See Also:
        org​.apache​.sis​.referencing​.factory​.Geodetic­Authority­Factory#create­Unit(String)
      • getEpsgCode

        public static Integer getEpsgCode​(Unit<?> unit,
                                          boolean inAxis)
        Returns the EPSG code of the given units, or null if unknown. This method is the converse of value­Of­EPSG(int).

        The same unit may be represented by different EPSG codes depending on the context:

        • EPSG:9102 – degree – is used for prime meridian and coordinate operation parameters.
        • EPSG:9122 – degree (supplier to define representation) – is used for coordinate system axes.
        When such choice exists, the code to return is determined by the in­Axis argument, which specifies whether the code will be used for axis definition or in other context.
        Parameters:
        unit - the unit for which to get the EPSG code.
        in­Axis - true for a unit used in Coordinate System Axis definition.
        Returns:
        the EPSG code of the given units, or null if unknown.
        Since:
        0.4
        See Also:
        org​.apache​.sis​.referencing​.cs​.Coordinate­Systems#get­Epsg­Code(Unit, Axis­Direction...)