Skip to content

Instantly share code, notes, and snippets.

@easterncoder
Last active December 7, 2021 07:46
Show Gist options
  • Save easterncoder/b832198d1a83a71860cf54d638ff4d15 to your computer and use it in GitHub Desktop.
Save easterncoder/b832198d1a83a71860cf54d638ff4d15 to your computer and use it in GitHub Desktop.
import geopy
from geopy.distance import distance
# point of reference
lat = 8.000688 #8 00' 02.478"
lon = 125.023 #125 01' 22.960"
# coordinates from point of reference
coords = [
{
"b" : 0-(57+5/60),
"d" : 9381.71
},
{
"b" : 0-(71+10/60),
"d" : 175.79
},
{
"b" : 0+(3+57/60),
"d" : 246.58
},
{
"b" : 180-(75+56/60),
"d" : 40.31
},
{
"b" : 180-(60+19/60),
"d" : 189.41
},
{
"b" : 180+(15+7/60),
"d" : 206.33
},
]
for dd in coords:
origin = geopy.Point(lat, lon)
destination = distance(kilometers=dd["d"]/1000).destination(origin, dd["b"])
lat, lon = destination.latitude, destination.longitude
print(lat,',',lon)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment