Public Repository

Last pushed: 2 years ago
Short Description
Reverse geocoding as a simple offline service
Full Description

msa-geocoder

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.

Quick start

Execute the microservice container with the following command :

docker run -ti -p 9908:80 msagency/msa-geocoder

Examples

$ 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"
}

Endpoints

Standard endpoints

About

A project by the Microservices Agency.

Docker Pull Command
Owner
msagency