Hi all

I am helping to build a web mapping application using Openlayers, Geoserver and 
PostGIS. One of the fundamental functions that we need to build into the 
application is the facility to allow users to define a bounding box on the map 
to discover all the spatial data available for that area. I'm currently working 
on the database SQL needed to process such a request. I've written the 
following query that allows me to retrieve the data within a bounding box for a 
single polygon layer:

SELECT policeareas.gid, policeareas.name, ST_AsEWKT(policeareas.the_geom) as 
WKT FROM policeareas, boundingbox WHERE ST_Intersects(boundingbox.the_geom, 
policeareas.the_geom);

What I don't know how to do is to write a query that retrieves ALL spatial data 
(point, line and polygon layers/tables) in the database within the specified 
search area. Also, should I be using Box2d or Box3d to handle my bounding box 
object?

Any help/pointers appreciated.

Thanks

Rob




Dr Robert Berry
Wales Institute of Social and Economic Research, Data and Methods (WISERD)
Room J308b
GIS Research Centre
Faculty of Advanced Technology
University of Glamorgan
CF371DL

01443 483377
[email protected]

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

Reply via email to