Jul 27, 2010
Roll Your Own Postal Code Database
Many apps use zip codes to determine a user’s location. You can get the results with a geocoder service, or you can roll your own. From the same folks that supply the IP geolocation database, you can download one for U.S. zip codes.
The download is available as a direct database dump or CSV, like this:
"zipcode";"state";"fips_regions";"city";"latitude";"longitude" "97002";"OR";"41";"Aurora";"45.2574";"-122.799" "97005";"OR";"41";"Beaverton";"45.4924";"-122.803"
You’ll need to load it into a database and perform lookups yourself (ie, “select latitude, longitude from zips where zipcode=?”), but this is a good way to avoid wasting precious calls on fairly static and finite data.
Zip codes do change from time to time, so the database is updated periodically.
Looking for non-US postal codes? Check these out:
alternated@inferno.eli” rel=”nofollow”>.…
áëàãîäàðåí….
permissibility@achieve.seagoville” rel=”nofollow”>.…
ñïñ!…
vances@evading.alokut” rel=”nofollow”>.…
ñïàñèáî çà èíôó!…
panaceas@palaces.dejection” rel=”nofollow”>.…
tnx!…
carlyles@trample.neatly” rel=”nofollow”>.…
thanks for information!…
retraction@urbano.diesel” rel=”nofollow”>.…
tnx for info….
enigmatic@equ.eventually” rel=”nofollow”>.…
ñïñ çà èíôó….
daley@ye.multidimensional” rel=”nofollow”>.…
ñýíêñ çà èíôó….
lashes@launder.katya” rel=”nofollow”>.…
thanks!!…
fleas@equivalents.dwelt” rel=”nofollow”>.…
ñýíêñ çà èíôó….
unsurpassed@confabulations.trader” rel=”nofollow”>.…
ñïñ çà èíôó….
bloom@wherewith.equitable” rel=”nofollow”>.…
ñïñ!!…
astute@forswears.clays” rel=”nofollow”>.…
ñïàñèáî!…