|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.javadocmd.simplelatlng.util.LatLngConfig
public class LatLngConfig
Configuration parameters for latitude and longitude calculations.
| Field Summary | |
|---|---|
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. |
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final double DEGREE_TOLERANCE
public static final double EARTH_MEAN_RADIUS_KILOMETERS
| Method Detail |
|---|
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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||