Skip to content
This repository has been archived by the owner on Aug 14, 2018. It is now read-only.

Latest commit

 

History

History
23 lines (16 loc) · 1.29 KB

readme.md

File metadata and controls

23 lines (16 loc) · 1.29 KB

geographic-center

npm version dependencies Build Status MIT License

JavaScript module for calculating the geographic center of given (probably somewhat inexact) GPS/WGS84 coordinates located in a zone with a maximal width of 200km.

Made during DB Open Data Tech Hackday on 17./18.06.2016.

Usage

const geocenter = require('geographic-center')

let points = [
	{lat: 52.523370725444884, lon: 13.359761238098145},
	{lat: 52.522328870925726, lon: 13.36810827255249},
	{lat: 52.52602355445194, lon: 13.368194103240967}
]
let center = geocenter(points) // {lat: 52.5239077824627, lon: 13.365354502660765}

Contributing

If you found a bug, want to propose a feature or feel the urge to complain about your life, feel free to visit the issues page.