Oracle and SELECTs with OGR . .

Bob Basques bob.basques at CI.STPAUL.MN.US
Wed Jan 4 15:10:44 EST 2006


All (well actually, those OGR GURUs),

Anyone have an example (request Syntax) of using a OGR connection to 
filter with a Outer Select using MapServers IMGEXT as the inner select?

We're trying to run a complicated SELECT statement against a layer in 
Oracle, but would like to use the MapServer IMGEXT as the inner SELECT 
and having problems figureing it out.

How can the MapServer Spatial filter be used in the inner SELECT before 
we filter with our Select?

What should the MAPFILE elements look like?

What we want to do as the "outer select":

select * from sewer_permits1 where ogr_fid in (select max(ogr_fid) from 
sewer_permits1 group by id);

We can't seem to get this to be used AFTER the Spatial Select occurs 
from the MapServer Request.  It's rather slow if it's used before the 
MapServer Spatial Filter, so we need the Spatial aspects to run first, 
then run this statement on the output from the MapServer Spatial 
operation instead of the whole DB.

Thanks

bobb



More information about the mapserver-users mailing list