LibLatLon.Coords.borrow
You're seeing just the function
borrow
, go back to LibLatLon.Coords module for more information.
Specs
borrow( {number(), number()} | nil | {dms_ss(), dms_ss()} | dms_ss() | [number()] | map() | binary() | Keyword.t() | Exexif.Data.Gps.t({} | number()) ) :: t() | number() | nil | {:error, any()}
Converts literally any input to LibLatLon.Coords
instance.
Examples
iex> LibLatLon.Coords.borrow("41°23´16˝N,2°11´50˝E")
%LibLatLon.Coords{lat: 41.38777777777778, lon: 2.197222222222222}
iex> LibLatLon.Coords.borrow("41°23´16.222˝N,2°11´50.333˝E")
%LibLatLon.Coords{lat: 41.387839444444445, lon: 2.197314722222222}
iex> LibLatLon.Coords.borrow({{{41, 23, 16.0}, "N"}, {{2, 11, 50.0}, "E"}})
%LibLatLon.Coords{lat: 41.38777777777778, lon: 2.197222222222222}
iex> LibLatLon.Coords.borrow(lat: 41.38, lon: 2.19)
%LibLatLon.Coords{lat: 41.38, lon: 2.19}
Specs
Converts {{degree, minute, second}, semisphere}
or
{[degree, minute, second], semisphere}
representation into
LibLatLon.Coords
.
Specs
Converts degree, minute, second, semisphere
representation into
LibLatLon.Coords
. When the last parameter semisphere
is not one of:
"S"
or "W"
or -1
or :south
or west
, it is implicitly
considered to be in NE
semisphere.