I'm trying to calculate distance between 2 locations. Each location has lat, lon, altitude
.
When calculating distance using Geopy
it doesn't seem to consider the altitude:
slight changes in lat, lot
influence the result, small/huge change in altitude doesn't affect the resulting distance.
What am I doing wrong? How to calculate geo distance considering the altitude?
Thanks!
import geopy
p1 = geopy.point.Point()
p1.latitude = 10
p1.longitude = -110
p2 = geopy.point.Point()
p2.altitude = 35
p2.latitude = 20
p2.longitude = -120
# low alt
p1.altitude = 350
print(geopy.distance.geodesic(p1, p2).km)
# 1541.8564339502925
# high alt
p1.altitude = 3500000
print(geopy.distance.geodesic(p1, p2).km)
# 1541.8564339502925