I’m currently building a B2B web application. As a part of the signup process, I require users to enter their office’s street address, state, and city, which I then geocode into latitude and longitude using the Bing Maps API. Since I’m primarily using their address for geocoding purposes, I haven’t had any issues so far, but now I’m wondering if I should collect their zip code “just in case”.
The only scenario I can think where a zip code would affect geolocation is if two places have the exact same address, city, and state but different zip codes. Is that scenario even possible?
Would it be a good idea to collect zip codes, even though I already have enough information to accurately and reliably geocode their coordinates?
6
Yes, you should collect the zip code. Mostly because there are cases where the post office and locals disagree on city names, and geocoders get confused. Adding a zip code will massively improve your odds of success
But there is also a case I heard of in the Boston area with 2 addresses with the same city, street, and street number..but different zip codes. It sucks having a website that can’t handle your address. And people in that position tend to get more frustrated over time, rather than less.
To add to btilly’s answer, yes you should require a ZIP code. Not only can this help validate the address, you also assume a US style ZIP code. Other countries use different postal code systems. The UK, for example, has a much finer grained postcode system, making it a much better validator and harder to infer from an address (although there are existing services that do both).
Yes you would want to collect this if nothing more than for a sanity check.
Addresses are frequently entered incorrectly. A geocoding engine often cannot necessarily tell you this. Take 100 main street denver co and 100 main street denver pa for example. A good thing to check is to ensure the address in fact does lie within that city and zip code. If the zip code does not match the city and state, then likely one of the 3 fields are wrong and you could prompt the user at that time to check for address errors.
You might also want to have the zip code if you are planning on using something like a cass verification service to ensure the address is valid in the US.
Like the other respondents I would collect zip codes, for all the reasons stated. In addition, it is possible for geocoding to give incorrect information. I have not dealt with Bing, but I do know that Google (and some GPS systems) can give incorrect information when dealing with addresses. I have never got to the bottom of the incompatibility, but the post code and the actual location do not match for my address when using these services, and I am forever having to give couriers and others seeking my address false information to guide them to my actual location.