Reverse geocoding as a simple offline service
1.2K
Reverse geocoding as a simple offline service.
For a given latitude,longitude returns the matching country code, the administrative region and the name of the closest city (cities with population of 1000+, data from the GeoNames project.
Built using reverse-geocoder, an updated version of reverse_geocode.
Execute the microservice container with the following command :
docker run -ti -p 9908:80 msagency/msa-geocoder
$ curl "http://localhost:9908/geocoder?lat=45.5017&lon=-73.5673"
{
"admin1": "Quebec",
"admin2": "Montreal",
"cc": "CA",
"lat": "45.50884",
"lon": "-73.58781",
"name": "Montreal"
}
With a geojson Point :
$ curl -X POST -H "Content-Type: application/json" "http://localhost:9908/geocoder" -d '{
"coordinates": [
15.087,
37.503
],
"type": "Point"
}'
{
"admin1": "Sicily",
"admin2": "Catania",
"cc": "IT",
"lat": "37.49223",
"lon": "15.07041",
"name": "Catania"
}
A project by the Microservices Agency.
Content type
Image
Digest
Size
131.4 MB
Last updated
over 9 years ago
docker pull msagency/msa-geocoder