Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marianogappa/gps
Query OpenStreetMap for lat-long coordinates
https://github.com/marianogappa/gps
cli coordinates latlong openstreetmap
Last synced: about 1 month ago
JSON representation
Query OpenStreetMap for lat-long coordinates
- Host: GitHub
- URL: https://github.com/marianogappa/gps
- Owner: marianogappa
- License: mit
- Created: 2024-04-11T17:26:51.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-04-12T18:33:57.000Z (9 months ago)
- Last Synced: 2024-04-13T04:41:42.984Z (9 months ago)
- Topics: cli, coordinates, latlong, openstreetmap
- Language: Go
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.