Show HN: Geocoding API built with government open data
latlon.ioI've been working on a side project that needs to geocode a large amount of addresses, so as a tangent I built this geocoding API over the past month. The state of open source geocoding tools is pretty amazing, especially if you only need to geocode addresses in the US.
I explored Nominatim, which uses Open Street Map data, and PostGIS before settling on PostGIS. Nominatim has the ability to geocode international addresses, which is a huge plus, but it runs as a standalone web service and its address parser seemed to have trouble with many addresses that PostGIS handled well. PostGIS can be setup with the US census Tiger/Line data to cover the entire country and runs directly in the database which gives quite a performance boost.
Nice work! I really like the minimal homepage.
One small suggestion, when someone clicks the 'Try It' button and it scrolls to the address input have it focus the input for the user.
I've actually been needing the exact opposite of this tool lately. I have a bunch of lat lon pairs that I need turned into addresses. Any plans to add reverse geocoding any time soon?
The input focus would be a good usability upgrade - thanks. It does actually do reverse geocoding as well, but there is not "try-it" feature for that part of the API yet. The docs for that functionality are here - https://latlon.io/documentation#reverse-geocode. What specific type of info are you looking to get when turning those lat/lon pairs into addresses?
Oh nice, I guess I didn't get that far in the docs. Actually, for my use case this would be perfect. I just need the city, state and zip.
Tell me the difference between this service and Google Geocoding, OpenCage, or OpenStreetMap?
There are 3 broad groups of geocoding services out there.
1. Free tier with only a few allowed uses (and enterprise access starting in the 5 figures). Google maps falls into this category as in the free tier you can only use the geocoding results to display points on a Google Map that is freely accessible. Google obviously has great results and is worldwide.
2. Open to everyone but rate limited. This is where Nominatim/Open Street Map falls. They have coverage worldwide and you can freely access the API, but with only 1 request per second. I also found that they could not find results for quite a few addresses I tested which were returned easily by other services.
3. Paid API with no restrictions on use. This is where LatLon.io falls and Opencage as well. They look to have a pretty good product and will be a good competitor!