Package Exports
- geodesy-fn
Readme
geodesy-fn
Geodesic functions for GeoJSON, based on geodesy.
Compared to geodesy, this library exports geodesic calculations as light-weight functions. The input/output is GeoJSON.Position = [longitude, latitude].
Currently implemented functions from geodesy:
- spherical
distanceinitialBearingfinalBearingmidpointdestinationPoint
More functions from geodesy can be added as needed.
Install
npm install geodesy-fnUsage
import { distance } from 'geodesy-fn/src/spherical';
const p1 = [0.119, 52.205];
const p2 = [2.351, 48.857];
const d = distance(p1, p2);