New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

node-geopoint

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-geopoint

JavaScript coordinate conversion library between Decimal Degree and Deg-Min-Sec.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

#node-geopoint

JavaScript coordinate conversion library between Decimal Degree and Deg-Min-Sec.

Release npm version
Build Status devDependency Status

This library expects latitude and longitude in EPSG:4326 (WGS84). To convert between different projections check out Proj4js.

Installation

npm install node-geopoint

Convert Decimal -> Degrees

const geo = require('node-geopoint')

const lat = 58.74554729994484
const lng = 24.72504500749274
const res = geo(lat, lng)

console.log(res.lat.deg) // 58° 44' 43.97"
console.log(res.lng.deg) // 24° 43' 30.16"

Convert Degrees -> Decimal

const geo = require('node-geopoint')

const lat = '58° 44\' 43.97"'
const lng = '24° 43\' 30.16"'
const res = geo(lat, lng)

console.log(res.lat.dec) // 58.74554722222222
console.log(res.lng.dec) // 24.725044444444443

Original authors

FAQs

Package last updated on 18 Dec 2016

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