[Mapserver-users] Mapserver - OGR - Oracle (revisited)

Frank Warmerdam warmerdam at pobox.com
Wed Apr 7 17:33:16 EDT 2004


Bart van den Eijnden wrote:
> Hi Frank,
> 
> thanks for your reaction. I have submitted an enhancement bug about this 
> in the GDAL bugzilla (543).
> 
> With regard to the DATA statement, do you have any idea why only the 
> second option incorporates the BBOX in the query which is sent to Oracle?

Bart,

The problem is that OGR has a hard time (without parsing an interpreting
it) to know what table(s) a user supplied selected statement refers to.
Without that information it can't safely apply a spatial query in case
the table isn't spatially indexed (and because it doesn't know what
column to use for geometry).

 > Would the only way to use a WHERE clause (or to not select all columns
 > of a table) be to define a view in Oracle and use the view in the DATA
 > statement?

The view might work.  I think the current mechanism to test for a spatial
index is to try a small query with a spatial component.  If this works, it
assumes a spatial index is available, otherwise it assumes not.  So a view
might work well.

I assume you are using the query "select ORA_GEOMETRY from AdreSDO" to
avoid pulling all the unneeded extra attributes from the table?   Daniel
has long suggested I should have an option in OGR to just read geometry
for features.  Perhaps I should consider it more seriously.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the mapserver-users mailing list