[postgis-users] RE: Buffer query
Bill Tenbroeck
btenbroeck at itserve.com
Tue May 16 08:12:13 PDT 2006
Oops! The 5 mile radius from those coordinates falls in the ocean, hence the results. Doh!
________________________________
From: Bill Tenbroeck
Sent: Mon 5/15/2006 6:15 AM
To: postgis-users at postgis.refractions.net
Subject: Buffer query
I am trying to generate a query that will yield the areas of US blockgroups that fall within a 5-mile radius of a point. The area should be clipped at the radius boundary, and only return that portion within the buffer. My projection is Albers, North American. It would *seem* that the sum of the resultant output would yield the area of a circle with a 5 mile radius. (In square meters, I have calculated this to be a bit over 203 million sq meters). However, my results are summing to a little over 181 million sq meters.
The query I am using is:
SELECT area(intersection(r.geom, buf_geom)) AS clippedarea, area(r.geom) as totalarea, r.fips, '27653' as CID
FROM blkgrp_alb AS r, Buffer(GeomFromText('POINT(1919020.564 673785.6216)',102008),8046.72) buf_geom
WHERE r.geom && buf_geom
AND intersects(r.geom, buf_geom)
order by fips
Can anyone see either the flaw in the query or my logic?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20060516/fa1385c1/attachment.html>
More information about the postgis-users
mailing list