Class TethysLatLong

java.lang.Object
tethys.localization.TethysLatLong

public class TethysLatLong extends Object
Static formatting (rounding and range checking) functions for latlong values.
Author:
dg50
  • Field Details

    • metreDecimalPlaces

      public static int metreDecimalPlaces
      Number of decimal places for metre accuracy
    • mmDecimalPlaces

      public static int mmDecimalPlaces
      Number of decimal places for mm accuracy.
  • Constructor Details

    • TethysLatLong

      public TethysLatLong()
  • Method Details

    • formatLatitude

      public static Double formatLatitude(Double latitude)
      Check range of a latitude value. This function does absolutely nothing, but is here for completeness.
      Parameters:
      latitude -
      Returns:
    • formatLatitude

      public static Double formatLatitude(Double latitude, int decimalPlaces)
      Check range and round a latitude value to a set number of decimal places.
      Parameters:
      latitude -
      decimalPlaces -
      Returns:
    • formatLatitude_m

      public static Double formatLatitude_m(Double latitude)
      format a latitude to metre accuracy
      Parameters:
      latitude -
      Returns:
    • formatLatitude_mm

      public static Double formatLatitude_mm(Double latitude)
      format a latitude to mm accuracy
      Parameters:
      latitude -
      Returns:
    • formatLongitude

      public static Double formatLongitude(Double longitude)
      Check range of a longitude value which must be between 0 and 360. This function does absolutely nothing, but is here for completeness.
      Parameters:
      latitude -
      Returns:
    • formatLongitude

      public static Double formatLongitude(Double longitude, int decimalPlaces)
      Check range and round a longitude value to a set number of decimal places.
      Parameters:
      decimalPlaces -
      latitude -
      Returns:
    • formatLongitude_m

      public static Double formatLongitude_m(Double longitude)
      format a longitude value to m accuracy.
      Parameters:
      latitude -
      Returns:
    • formatLongitude_mm

      public static Double formatLongitude_mm(Double longitude)
      format a longitude value to mm accuracy.
      Parameters:
      latitude -
      Returns: