Go tools for working with geolocation coordinates
go get github.com/duohedron/go-geolocation
package main
import (
"fmt"
"github.com/duohedron/go-geotools"
)
func main() {
// Distance between two coordinates in kilometers
fmt.Println(geotools.Distance(0, 0, 47, 19)) // 5548.817065746805
}
This code was ported to Go directly from http://janmatuschek.de/LatitudeLongitudeBoundingCoordinates, and is owned by Jan Philip Matuschek.