Class TLcdAltitudeUnit

java.lang.Object
com.luciad.util.TLcdAltitudeUnit
All Implemented Interfaces:
ILcdISO19103UnitOfMeasure, Serializable

public class TLcdAltitudeUnit extends Object implements Serializable, ILcdISO19103UnitOfMeasure
This class defines altitude unit constants. The standard unit is 'meter'.
See Also:
  • Field Details

  • Constructor Details

    • TLcdAltitudeUnit

      public TLcdAltitudeUnit(String aUnitName, String aUnitShortName, double aToMetreFactor)
      Constructs a new altitude unit.
      Parameters:
      aUnitName - The name of the unit.
      aUnitShortName - The short name of the unit, typically used as the suffix after a number.
      aToMetreFactor - The factor to convert a value expressed in this unit to metres. For example, if the unit is km, the factor is 1000.
  • Method Details

    • getUnitName

      public String getUnitName()
      Returns the name of this TLcdAltitudeUnit (e.g. Meter, Kilometer, Mile, etc ...).
      Returns:
      the name of this TLcdAltitudeUnit (e.g. Meter, Kilometer, Mile, etc ...)
    • getUnitShortName

      public String getUnitShortName()
      Returns the short name of this TLcdAltitudeUnit (e.g. m, Km, Mi, etc ...).
      Returns:
      the short name of this TLcdAltitudeUnit (e.g. m, Km, Mi, etc ...).
    • getToMetreFactor

      public double getToMetreFactor()
      Deprecated.
      use convertToAltitudeAMSL(double, double, double) to convert the altitude expressed in this unit to meters AMSL.
      Returns the factor to apply to convert a altitude expressed in that specific unit into a altitude in meters.
      Returns:
      the factor to apply to convert a altitude expressed in that specific unit into a altitude in meters.
    • convertToAltitudeAMSL

      public double convertToAltitudeAMSL(double aAltitude, double aWGS84Lon, double aWGS84Lat)
      Converts an altitude expressed in this altitudes unit to meters above mean sea level.
      Parameters:
      aAltitude - an altitude expressed in this altitudes unit.
      aWGS84Lon - the location above which the altitude is converted expressed in WGS84 longitude.
      aWGS84Lat - the location above which the altitude is converted expressed in WGS84 latitude.
      Returns:
      the altitude above mean sea level at this location expressed in meters.
    • convertFromAltitudeAMSL

      public double convertFromAltitudeAMSL(double aAltitude, double aWGS84Lon, double aWGS84Lat)
      Converts an altitude expressed in meters above mean sea level to this altitudes unit.
      Parameters:
      aAltitude - an altitude expressed in meters above mean sea level.
      aWGS84Lon - the location above which the altitude is converted expressed in WGS84 longitude.
      aWGS84Lat - the location above which the altitude is converted expressed in WGS84 latitude.
      Returns:
      the altitude at this location expressed in this altitudes unit.
    • toString

      public String toString()
      Returns the unit name.
      Overrides:
      toString in class Object
      Returns:
      the unit name.
    • getUOMName

      public String getUOMName()
      Description copied from interface: ILcdISO19103UnitOfMeasure
      The name of the unit of measure
      Specified by:
      getUOMName in interface ILcdISO19103UnitOfMeasure
      Returns:
      the name of the unit of measure
    • getUOMSymbol

      public String getUOMSymbol()
      Description copied from interface: ILcdISO19103UnitOfMeasure
      The symbol used for the unit of measure
      Specified by:
      getUOMSymbol in interface ILcdISO19103UnitOfMeasure
      Returns:
      the symbol used for the unit of measure
    • getMeasureType

      public TLcdISO19103MeasureTypeCode getMeasureType()
      Description copied from interface: ILcdISO19103UnitOfMeasure
      The type of measure this unit of measure is used for.
      Specified by:
      getMeasureType in interface ILcdISO19103UnitOfMeasure
      Returns:
      the type of measure this unit of measure is used for.
    • getNameOfStandardUnit

      public String getNameOfStandardUnit()
      Returns the name of the standard unit for this type of measure, which is unit name of METRE_AMSL.
      Specified by:
      getNameOfStandardUnit in interface ILcdISO19103UnitOfMeasure
      Returns:
      the name of METRE_AMSL.
    • convertToStandard

      public double convertToStandard(double aValue)
      Converts to meters AMSL.
      Specified by:
      convertToStandard in interface ILcdISO19103UnitOfMeasure
      Parameters:
      aValue - the value expressed in this unit of measure.
      Returns:
      the value expressed in this unit converted to meters AMSL.
    • convertFromStandard

      public double convertFromStandard(double aValue)
      Converts from meters AMSL.
      Specified by:
      convertFromStandard in interface ILcdISO19103UnitOfMeasure
      Parameters:
      aValue - the value expressed in meters AMSL
      Returns:
      the same altitude expressed in this unit.
    • getAllAltitudeUnits

      public static TLcdAltitudeUnit[] getAllAltitudeUnits()
      Returns the available altitude units to consider in a JVM session.
      Returns:
      the available altitude units to consider in a JVM session.
      See Also:
    • setAllAltitudeUnits

      public static void setAllAltitudeUnits(TLcdAltitudeUnit[] aAllAltitudeUnitArray)
      Sets statically all TLcdAltitudeUnit to consider in a JVM session. Typically, this method should be called in the main of the application.
      Parameters:
      aAllAltitudeUnitArray - the altitude units to consider in a JVM session
      See Also:
    • addAltitudeUnit

      public static void addAltitudeUnit(TLcdAltitudeUnit aAltitudeUnit)
      Adds the specified altitude unit to the set of altitude units which are registered for this JVM session.
      Parameters:
      aAltitudeUnit - a altitude unit to be registered for this JVM session.
      Throws:
      IllegalArgumentException - If an altitude unit with the same symbol was already registered before.
    • removeAltitudeUnit

      public static void removeAltitudeUnit(TLcdAltitudeUnit aAltitudeUnit)
      Removes the specified altitude unit from the set of altitude units which are registered for this JVM session.
      Parameters:
      aAltitudeUnit - an altitude unit to be removed for this JVM session.
      Throws:
      IllegalArgumentException - If the specified altitude unit is not contained in the list of registered altitude units.
    • equals

      public boolean equals(Object aO)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object