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.
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}
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.