Re: Working with U.S. Zip Codes
From: Paul Brown <pbrown_at_triplerock.CS.Berkeley.EDU>
Date: 1996/04/22
Message-ID: <4lgn6s$q6n_at_agate.berkeley.edu>#1/1
Date: 1996/04/22
Message-ID: <4lgn6s$q6n_at_agate.berkeley.edu>#1/1
Jessica (je8468a_at_american.edu) wrote:
: I am currently working on an application (to be run under an ORACLE7
: database) which requires me to find the state for a specific U.S. zip
: code.
- A list of ZIP Codes and a geographic point (lat,long) associated with the Zip codecan be yanked from plenty of sites (TIGER being just one.
- A list of US States with a Polygon describing their outlines/boundaries can be obtained from either that site or the USGS.
- In a database which understands spatial data you can pose the following kind of query;
SELECT S.Name
FROM States S, Zip_Codes Z WHERE Z.Zip_Code = '94704' AND Contains(S.Boundary,Z.Center);
Given real spatial indexing (R-Trees), this can be evaluated very rapidly.
The other point to make is that ZIP_Codes are frequently used as approximations for other things. If I want to find out all the businesses within some distance of a point (and I didn't have a database which could be made to understand such things) I'm limited to using Zip codes, which aren't very precise because of their boundary constraints.
KR
Pb Received on Mon Apr 22 1996 - 00:00:00 CEST