|
I'm creating an issue ticket on GeoTools in response to the issue GEOS-6369. The issue is as follows:
GeoServer allows Oracle data without a spatial index to be added as a layer and configured etc.
However, when trying to render it, a OGC Exception is returned:
Rendering process failed java.io.IOException null ORA-13226: interface not supported without a spatial index ORA-06512: at "MDSYS.MD", line 1723 ORA-06512: at "MDSYS.MDERR", line 8 ORA-06512: at "MDSYS.SDO_3GL", line 1173
Andrea Aime notes that it may be possible to detect the lack of spatial index and change the way we build queries in such a way that they work anyway. To achieve this it is necessary to update some code within the GeoTools project as follows:
The Oracle dialect, that should attach information about the presence of a spatial index in the postCreateAttribute method, https://github.com/geotools/geotools/blob/master/modules/plugin/jdbc/jdbc-oracle/src/main/java/org/geotools/data/oracle/OracleDialect.java#L1152 Change the SQL being gerated by https://github.com/geotools/geotools/blob/master/modules/plugin/jdbc/jdbc-oracle/src/main/java/org/geotools/data/oracle/OracleFilterToSQL.java#L454 when the geometry attribute is missing the spatial index
For acceptance also a test that sets up a table without spatial indexes and runs spatial queries needs to be created, it could be a new subclass of JDBCSpatialFilterTest with a test setup that creates the necessary tables but does not add the spatial indexes for them.
It is my intention to look at doing the coding as suggested and I would like to track this work through this ticket.
|