geohax v0.0.1 Geohax

Geohash encoding and decoding.

Summary

Functions

Decodes a Geohash to a position {longitude, latitude}

Encodes a position {longitude, latitude} to a Geohash of precision length

Functions

decode(geohash)

Decodes a Geohash to a position {longitude, latitude}.

Example

iex> Geohax.decode("311x1r")
{-132.83, -38.1033}
encode(longitude, latitude, precision \\ 12)

Encodes a position {longitude, latitude} to a Geohash of precision length.

Example

iex> Geohax.encode(-132.83, -38.1033, 6)
"311x1r"