Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

geoutil

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

geoutil

Geographic formulas and geospatial transformations

  • 1.1.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Geoutil for Node.JS Build Status

NPM

Install

npm install geoutil --save

Usage

pointDistance()

Get the distance in meters between two points. Technical details

var pointA = [ 60.39826, 5.32907 ];
var pointB = [ 60.62869, 6.41474 ];

geoutil.pointDistance(pointA, pointB);
// 64781.55866944858

lineDistance()

Get total distance in meters for polyline. Technical details

var line = [
  [ 61.498792, 8.636448 ],
  [ 61.500270, 8.652638 ],
  [ 61.499957, 8.660266 ],
  [ 61.501822, 8.672846 ],
  [ 61.503748, 8.696228 ]
];

geoutil.lineDistance(line);
// 532.126784613296

polygonArea()

Get total area in meters^2 for polygon. Technical details

var polygon = [[
  [ 61.498792, 8.636448 ]
  [ 61.500270, 8.652638 ]
  [ 61.499957, 8.660266 ]
  [ 61.501822, 8.672846 ]
  [ 61.503748, 8.696228 ]
  [ 61.498792, 8.636448 ]
]];

geoutil.polygonArea(poly);
// 40.43198051882604

MIT License

Keywords

FAQs

Package last updated on 29 Dec 2014

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc