Using ST_DWithin(geom, geomPt, radius) returns all geom that
'intersects' any part of the circle's area (acts like ST_Intersects). 

What I would like, however, is only those geom 'completely within the
circle'. 
For instance, if the point is Orlando, FL and the radius is 2 miles, the
ST_Dwithin would return a shapes like the state Florida and the whole
US; where I only want the buildings in Orlando.

This is the closest approximation I have so far:

SELECT id, geom
FROM geospatial
WHERE ST_WITHIN(geom, ST_Expand(geometryFromText(geomPt, 4326), radius)
)

This is much better, but it still returns some geom that are outside of
the circle; specifically all geom completely within the superscribing
box returned by ST_EXPAND.

Thanks for your help
Tom

_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to