Hi there,
I’m working with the Social Change Online guys on developing the capability to deal with complex queries and objects. I’m having a few problems with the Oracle Spatial query at the moment and I’m wondering whether anyone else is having problems with BBox type queries against Oracle.
The relevant part of the query that Geoserver (probably actually Geotools) is generating is this:
( NOT SDO_RELATE(“LATLONG_GEOM”,MDSYS.SDO_GEOMETRY(2003,NULL,NULL,MDSYS.SDO
_ELEM_INFO_ARRAY(1,1003,1),MDSYS.SDO_ORDINATE_ARRAY(126.641345,-26.427555,126.64
1345,-25.637043,128.991336,-25.637043,128.991336,-26.427555,126.641345,-26.42755
5)),‘mask=disjoint querytype=WINDOW’) = ‘TRUE’ )
it generates this Oracle error:
Caused by: java.sql.SQLException: ORA-13029: Invalid SRID in the SDO_GEOMETRY object
ORA-06512: at “MDSYS.SDO_CS”, line 23
ORA-06512: at “MDSYS.SDO_3GL”, line 117
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:2337)
at oracle.jdbc.oci8.OCIDBAccess.fetch(OCIDBAccess.java:2012)
I’ve checked with a few people who have experience with SDO in Oracle and they have pointed out that that there’s no SRID in the querying bounding box geometry. I’m not sure why this is hapening. Any ideas? (NB I’m using the alias & OCI to connect to Oracle, I don’t think this should be causing a problem).
If someone who is successfully doing spatial queries against Oracle using Geoserver could send me the query that Geoserver is generating (which is pretty easy to get from the webserver logs) that would be really useful.
Cheers,
Stuart