Reverse Geocoding Is Hard

https://news.ycombinator.com/rss Hits: 12
Summary

My wife and I run OpenBenches - a crowd-sourced database of nearly 40,000 memorial benches. Every bench is geo-tagged with a latitude and longitude. But how do you go from a string of digits to something human readable? How do I turn -33.755780,150.603769 into "42 Wallaby Way, Sydney, Australia"? Luckily, that's a (somewhat) solved problem. Services like OpenCage, StadiaMaps, OpenStreetMap, and Geocode.Earth all provide APIs which transform co-ordinates into addresses. Done! Let's go home. Except… Not everywhere has an address. Some benches are in parks. They typically don't have a street number, but might have an interesting feature nearby to help with location. For example a statue or prominent landmark. And… Not every address is relevant. Some benches are on streets. But we probably don't want to imply that the bench is inside or belongs to a specific nearby house. Let's step back a bit. Why do we want to display a human-readable address? We have two use-cases. "As a visitor to the site, I want to:" Read a (rough) textual representation of where the bench is. Click on a component of the address to see all benches within that area. The first is easy to explain: The second is harder. Suppose a bench is in Wellington, New Zealand. We want to create a URl like openbenches.org/location/New Zealand/Wellington/. That way, users can click on the word "Wellington" and find all the benches nearby. A user can also manually edit that URl to increase or decrease precision. Both of these are problems of precision. Let's take a look at how one of the reverse geocoding services deals with transforming 51.476845,-0.295296 into an address: Royal Botanic Gardens, Kew, Sandycombe Road, Kew, London Borough of Richmond upon Thames, London, Greater London, England, TW9 2EN, United Kingdom That is too much address! Yes, it is technically accurate. But it contains far too much detail for humans, the postcode is irrelevant, and the weird-subdivisions are nothing that a local person would ...

First seen: 2025-04-27 15:16

Last seen: 2025-04-28 02:18