[thelist] Zip/Postal Code Radius

Ben Henick persist1 at io.com
Thu Dec 19 20:50:01 CST 2002

On 19 Dec 2002, Carl J Meyer wrote:

> Rob,
> On Thu, 2002-12-19 at 11:34, Rob Smith wrote:
> > This is something I've always been curious about. How do Zip/Postal Code
> > finders work where you enter your zip and it brings you the closest
> > something sorted by distance? Do you have to have a listing of all known zip
> > codes, distances to and fro or is there a website/formula that will
> > calculate this for you?
> AFAIK in order to actually calculate distances you need software that
> will convert zip codes to latitude/longitude numbers.  That software is
> available from the USPS for a hefty pricetag, I think they call it Tiger

There are ways to get at P.O. coordinates for free, if you're
strapped for cash or dealing with a regional area (as opposed to all fifty

If you search at usps.com for individual ZIP codes, the map supplied with
the results also provides the lat/long for the associated post office.

TIGER is actually a product of the Census Bureau, which can be found
online at


Both of these services return their most valuable information

If you just want the lat/long for a given P.O.


will return all sorts of neat results (albeit with hassles and
restrictions, such as a restriction of 2000 results per search) down to
seconds of a degree (CEP of approximately 100 feet).

Bear in mind further that all of the information pointed to above is based
on datasets that are two to three years old.  If your application is exact
enough to demand actual ZIP code maps and/or entirely up-to-date info,
that probably needs to be purchased.  Likewise if you want or need to
avoid the hassle of querying for results nationwide... a nibble at a time.

> something.  Otherwise you're limited to just finding things in "similar"
> zip codes (ie you can do a decent job finding "somewhat close" addresses
> by just using the first three digits of the zip, but that's pretty
> inexact.  And there are of course those people who live near a border
> between zip codes with different third digits, and it won't work well
> for them.  Eventually someone is bound to complain that your finder
> didn't find something that's 'practically just across the street').

Meanwhile, there is also the fact that ZIP codes are all too often
attached to toponyms that reflect poorly the location at issue.  For
example, my grandparents have a Portland address, according to the USPS...
but they live a good ten miles from Portland's main post office.

Some (but not all) first-three-digit combos will point to a specific city
*geographically* e.g. 972** for Portland, 981** for Seattle, 920** for San
Diego, 902** for central Los Angeles, 641** for Kansas City, 631** for St.
Louis, and so on.

...But all that really tells you is the next to last USPS facility your
post will visit before it reaches its recipient.

Also, a follow up for those not familiar with goedesy:  a "great circle"
is circumferential, and represents the shortest path ("as the crow flies")
between any two points that are on it.  Cf. the fact that canonically, a
flight from the U.K. to Japan crosses the Arctic Ocean rather than the
middle latitudes of Canada as one might expect as a result of
overexposure to maps intended primarily for navigation.

<tip type="UI design" author="Ben Henick">

In the United States, it's not uncommon when seeing someone park their
vehicle illegally in a disabled-reserved space to hear the quip, "I didn't
realize stupidity was a handicap."

I mention this because cartographic interfaces, while offering no end of
fodder for an attractive graphic design, are not necessarily well-suited
to general USian audiences.

Why?  Stories of USian geographic illiteracy are not really apocryphal.

Thus, it makes excellent sense in terms of accessibility - even when you
can assume that the user is browsing in IE - to provide hierarchical
access to the same resources.  And that's *before* we start talking about
WAI or Sec508.


Ben Henick                     "In the long run, men hit only what they aim
Web Author At-Large             at.  Therefore, though they should fail
http://www.io.com/persist1/     immediately, they had better aim high."
persist1 at io.com                 -- Henry David Thoreau

More information about the thelist mailing list