Find nearest geographic coordinates
empro2@REDACTED
empro2@REDACTED
Mon Nov 30 11:04:47 CET 2020
> >> I've a list of geographic coordinates:
> >>
> >> L = [ {{<<"longitude">>,6.1457}, {<<"latitude">>,46.2022}},
> >> {{<<"longitude">>,2.3387}, {<<"latitude">>,48.8582}},
> >> ... ]
Could you briefly hint at why L does not look somewhat more like
```
Ls = [{geoloc, 6.1457, 46.2022},
{geoloc, 2.3387, 48.8582},
...],
Lc = [{geocart, X, Y, Z}, ...].
%% Perhaps with something like:
-record(geoloc, {longitude :: float(),
latitude :: float()}).
```?
And along this:
> > The obvious question is SCALE:
```
1> erts_debug:size({{<<"ok">>, 3.1}, {<<"error">>, 2.1}}).
27
2> erts_debug:size({{ok, 3.1}, {error, 2.1}}).
15
3> erts_debug:size({ok, 3.1, 2.1}).
10
1> erts_debug:size({3.1, 2.1}).
9
```
I do not know what these numbers exactly mean, but:
everything counts in large amounts ...
Of course, data structure depends on use case.
As someone on this list usually puts it:
Enlightenment, please! :-)
~Michael
--
¡Menos economia! - ¡Mas econotuya!
Less economy! - More econoyou!
More information about the erlang-questions
mailing list