public class LatLngConfig extends Object
| Modifier and Type | Field and Description |
|---|---|
static double |
DEGREE_TOLERANCE
The tolerance (in degrees) by which two angles can differ and still be
considered the same.
|
static double |
EARTH_MEAN_RADIUS_KILOMETERS
The Earth's mean radius in kilometers.
|
| Modifier and Type | Method and Description |
|---|---|
static long |
doubleToLong(double value)
Function used to convert an angle in degrees to its internal,
fixed-precision long representation.
|
static NumberFormat |
getDegreeFormat()
Retrieve a NumberFormatter to use for formatting coordinates to String.
|
static double |
getEarthRadius(LengthUnit unit)
Retrieve the Earth's spherical approximation radius in the desired unit.
|
static double |
longToDouble(long value)
Function used to convert an angle in degrees to its external double
representation.
|
static void |
setDegreeFormat(ThreadLocal<NumberFormat> formatThreadLocal)
Sets the NumberFormatter to use for the purposes of all future coordinate
formatting in this library.
|
static void |
setEarthRadius(double radius,
LengthUnit unit)
Sets the Earth's radius for the purposes of all future calculations in
this library.
|
public static final double DEGREE_TOLERANCE
public static final double EARTH_MEAN_RADIUS_KILOMETERS
public static NumberFormat getDegreeFormat()
public static void setDegreeFormat(ThreadLocal<NumberFormat> formatThreadLocal)
formatThreadLocal - a ThreadLocal instance which instantiates the
NumberFormatter to use.public static double getEarthRadius(LengthUnit unit)
unit - the desired unit for the result.public static void setEarthRadius(double radius,
LengthUnit unit)
radius - the Earth's spherical approximation radius.unit - the unit the radius is given in.public static long doubleToLong(double value)
value - the value to convert.public static double longToDouble(long value)
value - the value to convert.Copyright © 2010-2015. All Rights Reserved.