This package provides access to Nominatim, a tool to search OSM data by name and address.
Simply run go get github.com/nicostuhlfauth/geoosm
Example:
package main
import (
"fmt"
"log"
"github.com/nicostuhlfauth/geoosm"
)
func main() {
data, err := geoosm.NewOSMData().GetJSON("Times+Square,+New+York,+USA")
if err != nil {
log.Println(err)
}
fmt.Println(data[0].Lat + "," + data[0].Lon)
}
MIT.
The OpenStreetMap data is provided under the terms of Open Database License (ODbL).