Skip to content

Latest commit

 

History

History
46 lines (33 loc) · 932 Bytes

README.md

File metadata and controls

46 lines (33 loc) · 932 Bytes

GPS

Go CLI tool that fetches (lat,lng) coordinates for search terms using the Nominatim API from OpenStreetMap.

Installation

$ go install github.com/marianogappa/gps@latest

Usage

$ echo "Berlin,London" | tr ',' '\n' | gps
52.5170365	13.3888599	Berlin
51.4893335	-0.14405508452768728	London
$

Or say you have a file:

$ cat countries.csv
Germany
UK
$ cat countries.csv | gps
51.1638175	10.4478313	Germany
6.3110548	20.5447525	UK
$

For CSV output:

$ echo "Berlin,London" | tr ',' '\n' | gps --separator comma
52.5170365,13.3888599,Berlin
51.4893335,-0.14405508452768728,London

Notes

  • It caches results in the system's temp folder to be nice to OpenStreetMap. Your system should® automatically evict it.

License

This project is licensed under the MIT License - see the LICENSE file for details.