Class GeolocationMaths
java.lang.Object
de.hybris.platform.storelocator.constants.GeolocationMaths
Utility class providing useful coordinates conversions
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionstatic int[]decimal2DMS(double decimal) Converts decimal representation to DMS coordinate representation (degree, minute, second)static doubledms2Decimal(int[] dms) Converts DMS coordinate representation to decimalstatic doubletruncateDecimal(double decimal)
-
Field Details
-
SIGNIFICANT_DIGITS
public static final int SIGNIFICANT_DIGITS- See Also:
-
SCALE_DIGITS
public static final int SCALE_DIGITS- See Also:
-
-
Method Details
-
decimal2DMS
public static int[] decimal2DMS(double decimal) Converts decimal representation to DMS coordinate representation (degree, minute, second)- Parameters:
decimal-- Returns:
- primitive array int[]
- Throws:
GeoLocatorException
-
dms2Decimal
public static double dms2Decimal(int[] dms) Converts DMS coordinate representation to decimal- Parameters:
dms-- Returns:
- double
- Throws:
GeoLocatorException
-
truncateDecimal
public static double truncateDecimal(double decimal)
-