geohash-1.0.1: Geohash latitudes and longitudes.

PortabilityGHC
Stabilityexperimental
Maintainermarius@monkey.org

Data.Geohash

Description

Compute geohashes as per http://en.wikipedia.org/wiki/Geohash.

Synopsis

Documentation

encodeSource

Arguments

:: (Fractional a, Ord a) 
=> Int

precision

-> (a, a)

(lat, lon) pair

-> Maybe String

geohash

Encode a geohash from the given (lat, lon) pair with the given precision.

 encode 10 (37.775, -122.419)

decodeSource

Arguments

:: Fractional a 
=> String

geohash

-> Maybe (a, a)
(lat, lon)

Decode a geohash into a (lat, lon) pair.

 decode "9q8yyk9pqd"

decode_Source

Arguments

:: Fractional a 
=> String

geohash

-> Maybe ((a, a), (a, a))
((latmin, latmax), (lonmin, lonmax))

Decode a geohash into ranges of latitude & longitude. This reflects the precision of the decode and can be used to construct a bounding box.

 decode_ "9q8yyk9pqd"