List:General Discussion« Previous MessageNext Message »
From:Graeme B. Davis Date:February 25 2000 2:50pm
Subject:Re: Zip codes...
View as plain text  
I actually found them free!  They are from ~1990 but I haven't come across
any problems.

http://ftp.census.gov/ftp/pub/tiger/tms/gazetteer/

you can also get useful data from:

http://www.census.gov/plue/
http://www.census.gov/cgi-bin/plue/geocorr/cgis/sedaccont?../data/corrlst_li
b/pumas@secure

I use this on my site and do all of my calculations INSIDE MySQL -- it was
pretty cool doing all of the research to do this and this information should
be free anyways!

have a nice weekend,

Graeme


----- Original Message -----
From: "James Treworgy" <jamie@stripped>
To: <mysql@stripped>
Sent: Friday, February 25, 2000 8:13 AM
Subject: Re: Zip codes...


> You can get databases of ZIP codes with latitudes and longitudes
> commercially for pretty reasonable prices.  To calculate distances between
> them it's just a little trignonometry.  A simple absolute value is likely
> to be egregiously wrong in many cases, even for ordering, just by the
> nature of the beast - you're talking about one-dimensional comparison of
> numbers scattered across a two-dimensional space, if that makes any
> sense.  If this is for a commercial endeavour definitely spend the $100 or
> so  for a database with longs & lats and get it exactly right.
>
> Jamie
>
> At 05:14 PM 2/24/00 -0600, Dan Nelson wrote:
> >If you mean closest in the mathematical sense,
> >
> >SELECT zipcode FROM table ORDER BY ABS(zipcode-$myzip)
> >
> >will work.  If you want true geographic locality, you'll have to store
> >X + Y coordinates for each zipcode or something similar, and order by
> >abs(zipx-my_x) * abs(zipy*my_y) .
>
>
> --
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail mysql-thread29036@stripped
>
> To unsubscribe, send a message to:
>     <mysql-unsubscribe-GraemeD=uu.net@stripped>
>
>

Thread
Zip codes...Roy Nasser25 Feb
  • Re: Zip codes...Dan Nelson25 Feb
    • RE: Zip codes...Roy Nasser25 Feb
      • Re: Zip codes...Dan Nelson25 Feb
        • RE: Zip codes...Roy Nasser25 Feb
          • Re: Zip codes...Dan Nelson25 Feb
            • RE: Zip codes...Roy Nasser25 Feb
              • Re: Zip codes...Benjamin Pflugmann25 Feb
    • Re: Zip codes...James Treworgy25 Feb
  • Re: Zip codes...Graeme B. Davis25 Feb
    • Re: Zip codes...James Treworgy25 Feb
      • Re: Zip codes...Robert Crawford25 Feb