Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/marianogappa/gps

Query OpenStreetMap for lat-long coordinates
https://github.com/marianogappa/gps

cli coordinates latlong openstreetmap

Last synced: 3 days ago
JSON representation

Query OpenStreetMap for lat-long coordinates

Awesome Lists containing this project

README

        

# GPS

Go CLI tool that fetches `(lat,lng)` coordinates for search terms using the [Nominatim API from OpenStreetMap](https://nominatim.org/release-docs/latest/api/Overview/).

## Installation

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

## Usage

```bash
$ 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](LICENSE) file for details.