[postgis-users] extent of properties within a specified distance

User Map map.user at yahoo.com
Mon May 19 02:01:08 PDT 2008

thanks for reply. i think i have to clarify my problem a bit more. i want to get the records from my table within a specified distance for e.g 50 meters. For this i have to calculate the extent first to get the image in mapserver. what i have is just a polygon geom, which area as you know can vary from property to property. i dont want to take into account the area/distance the property holds, but a center point for that polygon, so to calculate the distance equally on each side of that point, and then calculate the extent of those records, for the image to be generated. what i have done uptil now is:
SELECT extent(geom),max(Distance('<center of polygon>',geom))as distance
from tarea
where within(geom,'<expand(geom,50)from the given geom>')
and Distance('<center of polygon>',geom)<=50
but this query is taking about 25-26 mins which is quite a large time span. and also when i get the results and on showing through the map server, the scale bar is not matching, i mean it has to show a 100 meter bar scale, but, it is showing more then 100 meters on the scalebar, about 192 or so. 
i hope this elaboration of problem will be helpful.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080519/7c2c0b58/attachment.html>

More information about the postgis-users mailing list