Package tethys.localization
Class TethysLatLong
java.lang.Object
tethys.localization.TethysLatLong
Static formatting (rounding and range checking) functions for latlong values.
- Author:
- dg50
-
Field Summary
Modifier and TypeFieldDescriptionstatic int
Number of decimal places for metre accuracystatic int
Number of decimal places for mm accuracy. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Double
formatLatitude
(Double latitude) Check range of a latitude value.static Double
formatLatitude
(Double latitude, int decimalPlaces) Check range and round a latitude value to a set number of decimal places.static Double
formatLatitude_m
(Double latitude) format a latitude to metre accuracystatic Double
formatLatitude_mm
(Double latitude) format a latitude to mm accuracystatic Double
formatLongitude
(Double longitude) Check range of a longitude value which must be between 0 and 360.static Double
formatLongitude
(Double longitude, int decimalPlaces) Check range and round a longitude value to a set number of decimal places.static Double
formatLongitude_m
(Double longitude) format a longitude value to m accuracy.static Double
formatLongitude_mm
(Double longitude) format a longitude value to mm accuracy.
-
Field Details
-
metreDecimalPlaces
public static int metreDecimalPlacesNumber of decimal places for metre accuracy -
mmDecimalPlaces
public static int mmDecimalPlacesNumber of decimal places for mm accuracy.
-
-
Constructor Details
-
TethysLatLong
public TethysLatLong()
-
-
Method Details
-
formatLatitude
Check range of a latitude value. This function does absolutely nothing, but is here for completeness.- Parameters:
latitude
-- Returns:
-
formatLatitude
Check range and round a latitude value to a set number of decimal places.- Parameters:
latitude
-decimalPlaces
-- Returns:
-
formatLatitude_m
format a latitude to metre accuracy- Parameters:
latitude
-- Returns:
-
formatLatitude_mm
format a latitude to mm accuracy- Parameters:
latitude
-- Returns:
-
formatLongitude
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
Check range and round a longitude value to a set number of decimal places.- Parameters:
decimalPlaces
-latitude
-- Returns:
-
formatLongitude_m
format a longitude value to m accuracy.- Parameters:
latitude
-- Returns:
-
formatLongitude_mm
format a longitude value to mm accuracy.- Parameters:
latitude
-- Returns:
-