[postgis-users] US zip code bounding boxes/ZCTA sizes

Lee Keel lee.keel at uai.com
Tue Nov 13 07:43:26 PST 2007


> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-
> bounces at postgis.refractions.net] On Behalf Of George Pavlov
> Sent: Tuesday, November 13, 2007 1:53 AM
> To: PostGIS Users Discussion
> Subject: [postgis-users] US zip code bounding boxes/ZCTA sizes
> 
> This is not strictly a PostGIS question, but I thought some kind soul
> here can help me since at least some folks on this list are likely to
> have this kind of data handy: I need to find the smallest minimum
> bounding box circle that could fit any US ZIP code (or a ZCTA to be
> precise). So basically can someone with ZCTA polygon data run something
> along these lines for me and tell me the result:
> 
> select max(diagonal_length)
> from (
>   select
>     your_distance_fn (
>       min(lat), min(long),
>       max(lat), max(long)
>     ) as diagonal_length
>   from your_zip_code_table
>   group by zip_code
> ) x
> ;
> 
> Even nicer would be if you could send me the output of the inner select
> so I can do some more analysis. Something like this maybe:
> 
> select
>   zip_code,
>   min(lat),
>   min(long),
>   max(lat),
>   max(long)
> from your_zip_code_table
> group by zip_code
> ;
> 
> Thanks in advance!
> 
> George
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users



This is a csv file that contains the zipcode and the min\max x and y.  You
should be able to dump this into a table and do whatever analysis you want.
Hope it is close to what you were looking for....

-Lee Keel


This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zip_extents.csv
Type: application/octet-stream
Size: 3554608 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20071113/87140403/attachment.obj>


More information about the postgis-users mailing list