https://github.com/tsileo/ge0
Offline reverse geolocation HTTP API.
https://github.com/tsileo/ge0
geohash go rawgeo reverse-geolocation
Last synced: about 6 hours ago
JSON representation
Offline reverse geolocation HTTP API.
- Host: GitHub
- URL: https://github.com/tsileo/ge0
- Owner: tsileo
- License: mit
- Created: 2017-03-26T18:39:56.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-21T18:10:57.000Z (over 7 years ago)
- Last Synced: 2025-08-12T21:33:03.932Z (about 2 months ago)
- Topics: geohash, go, rawgeo, reverse-geolocation
- Language: Go
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ge0
[](https://travis-ci.org/tsileo/ge0)
Offline reverse geolocation HTTP API.
## Quickstart
The index is built on the `cities1000.zip` (all cities with a population > 1000) dump from [GeoNames](http://www.geonames.org/).
You can download it [here](all cities with a population > 1000). Once you have unzipped the file, run:
```shell
$ ge0 -build-reversegeo-index -path-cities1000txt=/path/to/cities1000.txt /data/dir
```Once the index is built, you can just run:
```shell
$ ge0 /data/dir
```## API
### GET /api/reversegeo
Offline reverse geocoding, using the "cities" Places index (from Geonames Cities 1000 dataset).
Returns the nearest city, `data` can be `null` if no city is found with the given precision.
Parameters: `lat`, `lng` and `precision` (optional, in meters, default is 5km).
```
$ curl http://localhost:8010/api/reversegeo?lat=1.0&lng=1.0
```