nautical miles and statute miles units for DWITHIN spatial predicate do not work with Oracle Data Store
Description
Attempted a WMS request with a cql_filter containing the DWITHIN spatial predicate as follows:
DWITHIN(LAYER1_GEOM,collectGeometries(queryCollection('test:Layer2','LAYER2_GEOM','ATTRIB1 IN (1,2,3)')),5,statute miles);ATTRIB1 IN (1,2,3)
Received error:
Rendering process failed java.io.IOExceptionjava.sql.SQLException: ORA-29902: error in executing ODCIIndexStart() routine ORA-13207: incorrect use of the [ INVALID UNITS] operator ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 333
ORA-29902: error in executing ODCIIndexStart() routine ORA-13207: incorrect use of the [ INVALID UNITS] operator ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 333
Defect: GeoServer converts the DWITHIN function to the SDO_WITHIN_DISTANCE Oracle spatial operation. The conversion passes in the string ‘statute miles’ or ‘nautical miles’ to that operation. These are not valid values for SDO_WITHIN_DISTANCE. They should have been converted to MILE and NAUT_MILE respectively.
Attempted a WMS request with a cql_filter containing the DWITHIN spatial predicate as follows:
Received error:
Defect:
GeoServer converts the DWITHIN function to the SDO_WITHIN_DISTANCE Oracle spatial operation. The conversion passes in the string ‘statute miles’ or ‘nautical miles’ to that operation. These are not valid values for SDO_WITHIN_DISTANCE. They should have been converted to MILE and NAUT_MILE respectively.