OpenLocationCode v1.0.0 OpenLocationCode View Source
Documentation for OpenLocationCode.
Link to this section Summary
Functions
Generates an OpenLocationCode.CodeArea struct from a given Open Location Code
Same as decode/1 except will throw an exception if invalid
Generates a Open Location Code from the given coordinates. latitude and longitude
Same as encode/1 except will throw an exception if invalid
Determines if a string is a valid full Open Location Code
Recovers a full Open Location Code from a short code and a reference location.
Determines if a string is a valid short Open Location Code.
Removes four, six or eight digits from the front of an Open Location Code given a reference location.
Determines if a string is a valid sequence of Open Location Code characters.
Link to this section Functions
decode(code)
View Sourcedecode(binary()) :: {:ok, OpenLocationCode.CodeArea.t()} | {:error, binary()}
Generates an OpenLocationCode.CodeArea struct from a given Open Location Code
Same as decode/1 except will throw an exception if invalid
Generates a Open Location Code from the given coordinates. latitude and longitude
Examples
iex> OpenLocationCode.encode(29.952062, -90.077188)
{:ok, "76XFXW2F+R4"}
Same as encode/1 except will throw an exception if invalid
Examples
iex> OpenLocationCode.encode!(29.952062, -90.077188)
"76XFXW2F+R4"
Determines if a string is a valid full Open Location Code
recover_nearest(short_code, reference_latitude, reference_longitude)
View SourceRecovers a full Open Location Code from a short code and a reference location.
Determines if a string is a valid short Open Location Code.
Removes four, six or eight digits from the front of an Open Location Code given a reference location.
Determines if a string is a valid sequence of Open Location Code characters.