Skip to content

Latest commit

 

History

History
30 lines (25 loc) · 650 Bytes

README.md

File metadata and controls

30 lines (25 loc) · 650 Bytes

OpenStreetMap Geolocation in Golang

This package provides access to Nominatim, a tool to search OSM data by name and address.

Install

Simply run go get github.com/nicostuhlfauth/geoosm

Use the package

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)
}

License

MIT.

Data License

The OpenStreetMap data is provided under the terms of Open Database License (ODbL).