PDA

View Full Version : "Find a dealer near you..." or ZIP Code Patterns


]|V|[agnus
07-12-2004, 10:32 PM
I'm finishing up a site for a furniture warehouse. They will have a directory of dealer's available on their site, and would also like a "Find a Dealer Near You" function where users enter a ZIP code to have a list of dealers near them returned.

I've contacted the United States Postal Service to try to obtain information about how ZIP codes are assigned and the patterns surrounding that, but have been relatively unsuccessful. The closest thing I've found is that I can purchase a database of ZIP codes, but that doesn't do me much good without any knowledge of how they're related and assigned.

Searches for how to code a function like this are not providing much help since I don't quite know how to phrase it. I don't want to look for a languange specific solution since the knowledge I require isn't specific to, say, ColdFusion, rather it's specific to the USPS who won't tell me how they do it!

The USPS WebTools area is confusing as hell and so unintuitive it makes me ache inside. I think they might have the tools I want, but I have so far been unable to obtain these tools if they even exist on their site.

Gah... does ANYBODY know where I might turn for help with this?

]|V|[agnus
07-12-2004, 10:44 PM
Haha! God, I love the freakin' interweb sometimes...

After all my searching, where do I find the information I desire??? THE WIKIPEDIA: http://en.wikipedia.org/wiki/Zip_code

What a FOOL I was to think that the POSTAL SERVICE might have information on how THEIR system works.

Hehe...

]|V|[agnus
07-12-2004, 11:04 PM
For those at all interested, the Wikipedia, while giving me the information I sought, hasn't ultimately helped me.

Looking at my own state of Minnesota, for instance, I know this much: our block of ZIPs is 55000 - 56999. Now, looking at a list of ZIPs in MN from the Wikipedia, it seems most of the ones in Minneapolis and surrounding areas are 554xx and 553xx... okay, i think i see a pattern perhaps. Two cities near each other in a different region have 559xx... k... looking good, but then there's a city in the southwest with 56xxx while my hometown in central minnesota, a considerable distance away, is also 56xxx...

aye yaye yaye... ;)

Spookster
07-13-2004, 02:19 AM
http://www.hotscripts.com/PHP/Scripts_and_Programs/E-Commerce/Store_Locators/index.html

firepages
07-13-2004, 03:29 AM
basically you need a zipcode database that also has longitude & latitude fields & then its time for some math :eek:

I know they are freely available cos I downloaded a US one once but where .... I dunno , it was a long time ago.

]|V|[agnus
07-13-2004, 03:56 AM
yeah, thanks firepages... after a day of research, i was just realizing that myself. i was banking too long on the notion that it was a simple pattern to the numbers. but the long/lat coordinates of course make a lot of sense. if you figure out where you can get the database for free, then post it here, 'cause i think i've only seen ones you pay for...

found one for about $30... i think i could get that out of my bosses ;)

neofibril
07-13-2004, 05:48 AM
http://www.555us.com/555AK/555ak_zipcodes.htm

Roy Sinclair
07-13-2004, 08:12 PM
I went to a seminar a long time ago (20+ years) where the Post Office was talking up their Zip + Four program (i.e. the nine digit zip code) where they were trying to get all people who do mass mailings to switch to the nine digit code and during that seminar they explained how the five digit zip codes were broke down and why the nine digit codes were needed.

I did find this particular link that may help you: http://www.usps.com/ncsc/faq/#3 and that lead to here: http://www.usps.com/ncsc/products/tiger-z4.html