Skip to content

Instantly share code, notes, and snippets.


Paulo Alvarado czpython

View GitHub Profile
czpython /
Last active Feb 7, 2018 — forked from amites/
calculate center coordinate from a list of latitude, longitude pairs
# -*- coding: utf-8 -*-
import math
def center_geolocation(geolocations):
Provide a relatively accurate center lat, lon returned as a list pair, given
a list of list pairs.
ex: in: geolocations = ((lat1,lon1), (lat2,lon2),)
out: (center_lat, center_lon)