Extends
Methods
distanceTo(point) → {number|*}
Direct (simplistic) implementation of Algorithms for geodesics, Charles F F Karney, Journal of Geodesy 2012
(see also Geodesics on an ellipsoid of revolution, Charles F F Karney, 2011 for further explanations).
Notable historical background to methods used.
Parameters:
Name | Type | Description |
---|---|---|
point |
- Overrides:
- Source:
Returns:
- Type
- number | *
inverse()
- Overrides:
- Source:
toUtm(zoneOverrideopt) → {Utm}
Converts latitude/longitude to UTM coordinate.
Implements Karney’s method, using Krüger series to order n⁶, giving results accurate to 5nm
for distances up to 3900km from the central meridian.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
zoneOverride |
number |
<optional> |
Use specified zone rather than zone within which point lies; note overriding the UTM zone has the potential to result in negative eastings, and perverse results within Norway/Svalbard exceptions. |
Throws:
-
Latitude outside UTM limits.
- Type
- TypeError
Returns:
UTM coordinate.
- Type
- Utm
Example
const latlong = new LatLon(48.8582, 2.2945);
const utmCoord = latlong.toUtm(); // 31 N 448252 5411933