in reply to ZIP code distances

I've dealt with this specific issue. I'm sure that you've already found out that ZIP codes are messy beasts (there are actually places where a group of east-west streets will have different ZIPs than the north-south streets that intersect them). You may find Geo::PostalCode will suffice; I've not used it (I used ZIP code data provided by a company called Claritas; my then-employer was a market research firm, and I wrote the routines to deal with it in Fortran). One fairly significant issue is that not all ZIP codes are geographic entities. For example, some large companies have their own, as do some universities. The ZIP code data I dealt with had about 35,000 "real" ZIP codes, and a few thousand ZIP codes which were large businesses, college campuses, etc.

In any case, I'd store the ZIP and their corresponding latitude and longitude in a database, and only go off to Web when a ZIP can't be found.


minor editorial correction


emc

Information about American English usage here and here.

Any New York City or Connecticut area jobs? I'm currently unemployed.

Replies are listed 'Best First'.
Re^2: ZIP code distances
by jrmtreebeard (Novice) on Aug 24, 2007 at 22:18 UTC
    Geo::PostalCode works really well. However, the data source it suggests (1999 US Census data) is worthless here in Northern MA. Natick and Woburn (20 miles apart) have the same lat/long coordinates!
      However, the data source it suggests (1999 US Census data) is worthless here in Northern MA. Natick and Woburn (20 miles apart) have the same lat/long coordinates!

      Not only obsolete, but wrong from its inception. The USPS and US Census Bureau have pointers to what is probably the closest thing to an "official" list of ZIP code locations. One trouble with any static source is that ZIP codes get added fairly often, so any static data source is quickly obsolete. With the Census Bureau's TIGER data, there is also the problem that there are ZIP codes the Census Bureau doesn't care about, as they are non-residential, e.g. some businesses may have their own ZIP codes.


      emc

      Information about American English usage here and here.

      Any New York City or Connecticut area jobs? I'm currently unemployed.

A reply falls below the community's threshold of quality. You may see it by logging in.