Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 499 Bytes

README.md

File metadata and controls

27 lines (19 loc) · 499 Bytes

GoDoc

Geo calculations

Based on: https://en.wikipedia.org/wiki/Geohash

Install

go get github.com/mausimag/geolib

Usage

location := GeoLocation{
	lat: 48.668683,
	lon: -4.329321,
}

encoded := GeoEncode(&location, 9)
fmt.Printf("Encoded: [%s]", encoded)

decoded := GeoDecode("gbsuv7z7x")
fmt.Printf("Decoded: [%v, %v]", decoded.lat, decoded.lon)