mathetake / geotex

a package related to vertices of geohash's rectangles

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

geotex MIT License CircleCI

Given a latlng, geotex can be used to get the nearest vertex of its geohash's rectangle and get geohashes whose rectangle contains the vertex.

usage

package main

import (
	"fmt"

	"github.com/mathetake/geotex"
)

func main() {
	var accuracy uint = 6
	g, _ := geotex.NewGeotex(accuracy)

	vLat, vLng := g.GetVertex(0.1, 0.1)

	fmt.Printf("the nearest vertex's (lat, lng) = (%f, %f)", vLat, vLng)
}

License

MIT

About

a package related to vertices of geohash's rectangles

License:MIT License


Languages

Language:Go 100.0%