Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/meijirestored/location-finder
Simple flask app to return suburb/city/state/country from coordinates
https://github.com/meijirestored/location-finder
flask openstreetmap osm overpass overpass-api
Last synced: about 5 hours ago
JSON representation
Simple flask app to return suburb/city/state/country from coordinates
- Host: GitHub
- URL: https://github.com/meijirestored/location-finder
- Owner: MeijiRestored
- License: mit
- Created: 2024-09-19T17:04:50.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-01-12T13:59:37.000Z (about 18 hours ago)
- Last Synced: 2025-01-12T14:42:57.733Z (about 17 hours ago)
- Topics: flask, openstreetmap, osm, overpass, overpass-api
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Location Finder
A simple Flask app which returns the country/state/city/suburb name for given coordinates, using OpenStreetMap data.
## Endpoints
- `/lat/lon` : Get local names
- `/lang/lat/lon` : Get names for specified language. See https://wiki.openstreetmap.org/wiki/Names#Localization## Example request
`/fr/50.843388/4.349016`
```json
{
"city": "Bruxelles",
"country": "Belgique",
"country_code": "BE",
"country_flag": "🇧🇪",
"state": "Bruxelles-Capitale",
"suburb": "Quartier Midi-Lemonnier"
}
```
- If no name was found (most often suburb), empty string is returned.
- Country code is ISO3166-1.## Caching
This app uses Redis to cache data and thus reduce the amount of Overpass requests.
You can configure Redis or turn caching off in `config.py`.## Credits
- Data from [OpenStreetMap](https://osm.org)
- Overpass instance used : [Private.coffee](https:///overpass.private.coffee)