# Geodesy: how to calculate the straight line distance between two locations, which is represented by longitude and latitude?

**URL:** https://discourse.julialang.org/t/geodesy-how-to-calculate-the-straight-line-distance-between-two-locations-which-is-represented-by-longitude-and-latitude/19984
**Category:** Geo
**Tags:** diffeq, gmt, geodesy
**Created:** [January 23, 2019, 2:03pm UTC](https://discourse.julialang.org/t/geodesy-how-to-calculate-the-straight-line-distance-between-two-locations-which-is-represented-by-longitude-and-latitude/19984 "2019-01-23T14:03:11Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![stephancb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stephancb/32/14243_2.png) [@stephancb](https://discourse.julialang.org/u/stephancb)
#### Post date: [January 23, 2019, 3:28pm UTC](https://discourse.julialang.org/t/geodesy-how-to-calculate-the-straight-line-distance-between-two-locations-which-is-represented-by-longitude-and-latitude/19984/5 "2019-01-23T15:28:49Z")

</div>

To get the cartesian (2d-) distance on a map, have a look at [Proj4.jl](https://github.com/JuliaGeo/Proj4.jl) which is a Julia wrapper around a relatively widely used C library. As @improbable22 already wrote, this depends on the map projection.

---

_[View the full topic](https://discourse.julialang.org/t/geodesy-how-to-calculate-the-straight-line-distance-between-two-locations-which-is-represented-by-longitude-and-latitude/19984)._
