Find nearest geographic coordinates

Frank Muller frank.muller.erl@REDACTED
Wed Nov 25 22:38:57 CET 2020

Hi guys,

I've a list of geographic coordinates:

L = [ {{<<"longitude">>,6.1457}, {<<"latitude">>,46.2022}},
      {{<<"longitude">>,2.3387}, {<<"latitude">>,48.8582}},
      ... ]

and a specific coordinate X = {{<<"longitude">>,-73.5848},

Question: how can i find the nearest coordinates to X from L (sorted from
the nearest to the farest)?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the erlang-questions mailing list