That (using the zip code digits) won't work. Zip codes are assigned by
population density, not by distance. A big city might have several zip
codes, although they'd all likely have the same first three digits, but
check Manhattan for an example.

In our area, the core city (Hartford) and some of its suburbs have the same
three digits (061), even though they have their own post offices; but there
is a ring of suburbs that have a different prefix (060). It would be wrong
to assume that all of the 060 suburbs are closer to each other than they are
to the central city.

I imagine that some of the farm-land areas cover a lot of territory with
very few zip codes.

I don't know how the mapping software does it, really. They must have big
tables of some sort.

Regards,

Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341


-----Original Message-----
From: Jesse [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 29, 2006 4:31 PM
To: MySQL List
Subject: Zip Code & Distance


This is not necessarily SQL Specific, but it will impact my MySQL
application.

Using the zip code, how can you determine what's in a (say) 50 mile radius.
In other words, if I'm looking for schools within a 50 mile radius of my
location (Zip Code 33881), How can I determine this by the zip code?  I have
seen lots of search engines that do this, but don't know how they determine
the distance.  I figured that I can use the first 4 digits as a match, then
the first 3 digits which will be a little further away, but I don't know how
accurate that would be.  Does anyone have any ideas?

Thanks,
Jesse


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to