Re:Ask HN: What to use for world zip codes?
by Davertron on Tuesday May 18, 2010 @04:17PM
(#1358888)
I'd say freeform is a pretty good way to go if you don't need automated systems looking at the data. We've had issues with having specific fields for all the reasons mentioned in the comments (certain places don't have states/zips, etc.). However, we offer estimated shipping, so we have to be able to easily parse the address to send data to shipping carriers' web services (UPS, DHL), and that would be a total nightmare with freeform text. I would say making a nice interface that changes depending on the selected country would be ideal (google checkout seems to handle this pretty well).
Re:Ask HN: What to use for world zip codes?
by pierrefar on Tuesday May 18, 2010 @08:15AM
(#1357218)
And you can check that the address is sane using a geocoder. Both Google Maps and Yahoo! Maps have freely-accessible APIs for that.
Re:Ask HN: What to use for world zip codes?
by cianestro on Tuesday May 18, 2010 @08:04PM
(#1359577)
I asked the same question several weeks ago. Google's reverse geocoding api is a great solution. Instead of inserting hundreds of thousands of records into a database and juggling different tedious validation techniques it's a much better idea to only use latitudes and longitudes for locating people geographically. However, the project's details may require other routes but still thought I would share:
http://code.google.com/apis/maps/documentation/examples/geoc...
Users just click on their location on the map and Google hands off the nearest address info.
This has been a pet peeve of mine for a very long time.
Creating a free-form address parser might be a fun project. Validating the addresses might get expensive though. Are there any low cost/free alternatives to a service like Experian's QAS?
Upvoted for the "sensible" solution of freeform, but I'd like to hear from folks who need each piece broken out, and why.
I imagine zip codes are useful for auto-filling/formatting city information.
Shipping account software?
You usually need addresses to send someone something. I'd suggest just putting in a text field and letting the user just type it in freeform.