Skip to content

marianogappa/gps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Query OpenStreetMap for lat-long coordinates

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages