Reverse geocoding turns a latitude and longitude into an address. This service takes the coordinates as JSON, asks OpenStreetMap's Nominatim or BigDataCloud for the address at that point, and returns the provider's answer. It keeps each answer in memory, for 60 minutes by default, so repeat lookups of the same place skip the provider.
- Lookup - takes
latandlonin a JSON body and returns the address record for that point - Cache - answers repeat lookups that round to the same 3 decimal places from memory
- Health - answers
GETon any path with{"status": "healthy"} - Metrics - counts upstream requests per provider on a Prometheus endpoint
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
kubectl port-forward -n geocode svc/geocode 8080:8080From a second terminal:
curl -d '{"lat":"41.40338","lon":"2.17403"}' http://localhost:8080/Read the Docs hosts the same pages.
| Page | Contents |
|---|---|
| Installation | Requirements, the Helm chart, the Kustomize overlays, the container image, running locally, building from source, log output |
| Configuration | Command-line flags, setting flags in Kubernetes, Helm values |
| API | Endpoints, the request body, responses, errors, coordinate precision |
| Architecture | What one request does, the cache, the upstream providers, timeouts, logging |
| Metrics | Prometheus endpoint, metric names and labels, scrape setup |
The Helm chart needs Kubernetes 1.27 or later, and the image runs on linux/amd64 nodes only. Building from source needs the Go version that go.mod sets.
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.