<div><div style="border-color:rgb(255,255,255)" dir="auto">I’m new to GIS field, but this module states that Euclidian distance isn’t accurate compared to “Law of Haversines”:</div><div style="border-color:rgb(255,255,255)" dir="auto"><br></div><div style="border-color:rgb(255,255,255)" dir="auto"><a href="https://github.com/armon/teles/blob/master/src/teles_geo_query.erl#L87-L102">https://github.com/armon/teles/blob/master/src/teles_geo_query.erl#L87-L102</a></div><div style="border-color:rgb(255,255,255)" dir="auto"><br></div><div style="border-color:rgb(255,255,255)" dir="auto"><br></div><div style="border-color:rgb(255,255,255)" dir="auto">/Frank</div></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Wed 25 nov. 2020 à 22:45, Ivan Uemlianin <<a href="mailto:ivan@llaisdy.com">ivan@llaisdy.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">Hi Frank<br>
<br>
Do you want to sort the list by Euclidean distance from X? If so, could <br>
you use lists:sort/2?<br>
<br>
Ivan<br>
<br>
<br>
On 25/11/2020 21:38, Frank Muller wrote:<br>
> Hi guys,<br>
><br>
> I've a list of geographic coordinates:<br>
><br>
> L = [ {{<<"longitude">>,6.1457}, {<<"latitude">>,46.2022}},<br>
> {{<<"longitude">>,2.3387}, {<<"latitude">>,48.8582}},<br>
> ... ]<br>
><br>
> and a specific coordinate X = {{<<"longitude">>,-73.5848}, <br>
> {<<"latitude">>,45.4995}}.<br>
><br>
> Question: how can i find the nearest coordinates to X from L (sorted <br>
> from the nearest to the farest)?<br>
><br>
> /Frank<br>
<br>
-- <br>
============================================================<br>
Ivan A. Uemlianin PhD<br>
Llaisdy<br>
<br>
Ymchwil a Datblygu Technoleg Lleferydd<br>
Speech Technology Research and Development<br>
<br>
<a href="mailto:ivan@llaisdy.com" target="_blank">ivan@llaisdy.com</a><br>
@llaisdy<br>
<a href="http://llaisdy.wordpress.com" rel="noreferrer" target="_blank">llaisdy.wordpress.com</a><br>
<a href="http://github.com/llaisdy" rel="noreferrer" target="_blank">github.com/llaisdy</a><br>
<a href="http://www.linkedin.com/in/ivanuemlianin" rel="noreferrer" target="_blank">www.linkedin.com/in/ivanuemlianin</a><br>
<br>
festina lente<br>
============================================================<br>
<br>
</blockquote></div></div>