Reverse geocoding is used to find places or addresses near a latitude, longitude pair. Picture a map showing building outlines but no labels, then clicking on a building and being shown the name of the business. That is reverse geocoding.
This repository holds a small web service that performs reverse geocoding to determine whether specified geo coordinates has an address. If it is then the response will contain attributes associated with the matched address, municipality, county, country, etc.
By default, this will cache requests for 60 minutes to prevent repeated request(s) being sent again and again. The percision is limited to 3 decimal places.
The number of decimal places in geographic coordinates determines the accuracy of the location. Each additional decimal place increases the precision of the coordinates:
- One decimal place can pinpoint a location to within about 10 kilometres.
- Two decimal places can pinpoint a location to within about 1 kilometre.
- Three decimal places can pinpoint a location to within about 100 metres.
- Four decimal places can pinpoint a location to within about 10 metres.
- Five decimal places can pinpoint a location to within about 1 metre.
- Six decimal places can pinpoint a location to within about 10 centimetres.
helm repo add geocode https://saidsef.github.io/faas-reverse-geocoding
helm repo update
helm upgrade --install geocode geocode/reverse-geocoding --namespace geocode --create-namespace
NOTE: API can be accessed via port-forward
Service
or via EnablingIngress
kubectl apply -k deployment/
NOTE: API can be accessed via port-forward
Service
or via updatingIngress
Take it for a test drive:
curl -d '{"lat":"41.40338","lon":"2.17403"}' http://localhost:8080/
from requests import post
data='{"lat":"41.40338","lon":"2.17403"}'
r = post('http://localhost:8080/', data=data)
print(r.text)
Our latest and greatest source of Reverse Geocoding can be found on [GitHub]. Fork us!
We would ❤️ you to contribute by making a pull request.
Please read the official Contribution Guide for more information on how you can contribute.