geodesy-fn
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

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
    • distance
    • initialBearing
    • finalBearing
    • midpoint
    • destinationPoint

More functions from geodesy can be added as needed.

Install

npm install geodesy-fn

Usage

import { distance } from 'geodesy-fn/src/spherical';

const p1 = [0.119, 52.205];
const p2 = [2.351, 48.857];
const d = distance(p1, p2);

Dependents (11)

Package Sidebar

Install

npm i geodesy-fn

Weekly Downloads

1,899

Version

1.1.0

License

MIT

Unpacked Size

245 kB

Total Files

21

Last publish

Collaborators

  • zakjan