https://github.com/vectorhacker/go.geohash
geohash is a simple implementation of the Public Domain Geohash algorithm. It represents the hashes using boxes which contain the resulting hashes and can reverse the box, using the geohash and the precision to recreate it at.
https://github.com/vectorhacker/go.geohash
Last synced: 5 months ago
JSON representation
geohash is a simple implementation of the Public Domain Geohash algorithm. It represents the hashes using boxes which contain the resulting hashes and can reverse the box, using the geohash and the precision to recreate it at.
- Host: GitHub
- URL: https://github.com/vectorhacker/go.geohash
- Owner: vectorhacker
- License: mit
- Created: 2017-05-19T20:02:30.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2019-08-12T10:45:57.000Z (almost 7 years ago)
- Last Synced: 2024-06-20T08:13:08.569Z (almost 2 years ago)
- Language: Go
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
GeoHash Algororithm in Go
=====
Example
```go
package main
import "github.com/vectorhacker/go.geohash"
func main() {
box := geohash.Encode(46.7666, -101.4650, 0) // 0 is the same as full presicion
boxes := box.Neighbors()
boxesBoxes := boxes[0].Neighbors()
// ....
box1 := geohash.Decode("c8rf51e7n", 12)
box1.Neighbors()
// ...
}
```