🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

geodesy-fn

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

geodesy-fn

Geodesic functions for GeoJSON, based on geodesy

1.1.0
latest
Source
npm
Version published
Weekly downloads
6.2K
13.62%
Maintainers
1
Weekly downloads
 
Created
Source

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);

Keywords

geodesic

FAQs

Package last updated on 05 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts