Bug? BEYOND with Oracle Spatial

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug? BEYOND with Oracle Spatial

Mike Atkinson-2

When using the BEYOND command with Oracle Spatial (10g) it fails to find any results.

 

Using the Oracle SQL*plus terminal to replicate the command issued I get the following:

 

 

SQL> SELECT count(*) from LRPOLYS WHERE SDO_WITHIN_DISTANCE("GEOMETRY",MDSYS.SDO_GEOMETRY(2003,4277,

NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1),MDSYS.SDO_ORDINATE_ARRAY(379875.0,98124.2,380824.0,98183.0,

380907.0,97110.4,379896.0,97070.2,379875.0,98124.2)),'distance=20.0') = 'FALSE';

SELECT count(*) from LRPOLYS WHERE SDO_WITHIN_DISTANCE("GEOMETRY",MDSYS.SDO_GEOMETRY(2003,4277,NULL,

*

ERROR at line 1:

ORA-29902: error in executing ODCIIndexStart() routine

ORA-13207: incorrect use of the [SDO_WITHIN_DISTANCE] operator

ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 391

ORA-06512: at line 1

 

 

Note: I’ve changed to selection of columns to just count(*) to protect customer information.

 

The following command works correctly:

 

SQL> SELECT count(*) from LRPOLYS WHERE SDO_WITHIN_DISTANCE("GEOMETRY",MDSYS.SDO_GEOMETRY(2003,4277,

NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1),MDSYS.SDO_ORDINATE_ARRAY(379875.0,98124.2,380824.0,98183.0,

380907.0,97110.4,379896.0,97070.2,379875.0,98124.2)),'distance=20.0') != 'TRUE';

 

  COUNT(*)

----------

     19663

 

 

 

The GeoServer  trace is as below:  

 

 

 

49940158 [WARNING] org.vfny.geoserver.servlets.AbstractService - service except

ion while executing request:

Request: null

 output format:GML2

 max features:2147483647

 version:

 queries:

  Query []

   feature type: LandRegistry:LRPOLYS

   filter: [ GEOMETRY beyond POLYGON ((379875 98124.2, 380824 98183, 380907 9711

0.4, 379896 97070.2, 379875 98124.2)), distance: 20.0 ]

   [properties:  ALL ]

 

cause: org.geotools.data.DataSourceException: Could not count

 49940158 [WARNING] org.vfny.geoserver.ServiceException - encountered error: org

.geotools.data.DataSourceException: Could not count

StackTrace: org.geotools.data.DataSourceException: Could not count

        at org.geotools.data.jdbc.JDBCFeatureSource.count(JDBCFeatureSource.java

:416)

        at org.geotools.data.jdbc.JDBCFeatureSource$1.getCount(JDBCFeatureSource

.java:229)

        at org.vfny.geoserver.wfs.responses.FeatureResponse.execute(FeatureRespo

nse.java:286)

        at org.vfny.geoserver.wfs.responses.FeatureResponse.execute(FeatureRespo

nse.java:143)

        at org.vfny.geoserver.servlets.AbstractService.doService(AbstractService

.java:408)

        at org.vfny.geoserver.servlets.AbstractService.doPost(AbstractService.ja

va:344)

        at org.vfny.geoserver.wfs.servlets.WfsDispatcher.doResponse(WfsDispatche

r.java:246)

        at org.vfny.geoserver.wfs.servlets.WfsDispatcher.doPost(WfsDispatcher.ja

va:135)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358

)

        at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati

onHandler.java:294)

        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:5

67)

        at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)

        at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplication

Context.java:525)

        at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)

        at org.mortbay.http.HttpServer.service(HttpServer.java:879)

        at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)

        at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:961)

        at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)

        at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:

197)

        at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:276)

        at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511)

Caused by: java.sql.SQLException: ORA-29902: error in executing ODCIIndexStart()

 routine

ORA-13207: incorrect use of the [SDO_WITHIN_DISTANCE] operator

ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 391

ORA-06512: at line 1

Reply | Threaded
Open this post in threaded view
|

Re: Bug? BEYOND with Oracle Spatial

Chris Holmes-2
This one should go in the geotools tracker.  Again, it will probably sit
there since no one is actively working on oracle.  Would be great if
you could help out, at least with what the proper oracle call is - I
may be able to compile it and have you test it out.

best regards,

Chris

Quoting Mike Atkinson <[hidden email]>:

> When using the BEYOND command with Oracle Spatial (10g) it fails to
> find
> any results.
>
>
>
> Using the Oracle SQL*plus terminal to replicate the command issued I
> get
> the following:
>
>
>
>
>
> SQL> SELECT count(*) from LRPOLYS WHERE
> SDO_WITHIN_DISTANCE("GEOMETRY",MDSYS.SDO_GEOMETRY(2003,4277,
>
>
NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1),MDSYS.SDO_ORDINATE_ARRAY(379875

> .0,98124.2,380824.0,98183.0,
>
> 380907.0,97110.4,379896.0,97070.2,379875.0,98124.2)),'distance=20.0')
> =
> 'FALSE';
>
> SELECT count(*) from LRPOLYS WHERE
> SDO_WITHIN_DISTANCE("GEOMETRY",MDSYS.SDO_GEOMETRY(2003,4277,NULL,
>
> *
>
> ERROR at line 1:
>
> ORA-29902: error in executing ODCIIndexStart() routine
>
> ORA-13207: incorrect use of the [SDO_WITHIN_DISTANCE] operator
>
> ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 391
>
> ORA-06512: at line 1
>
>
>
>
>
> Note: I've changed to selection of columns to just count(*) to
> protect
> customer information.
>
>
>
> The following command works correctly:
>
>
>
> SQL> SELECT count(*) from LRPOLYS WHERE
> SDO_WITHIN_DISTANCE("GEOMETRY",MDSYS.SDO_GEOMETRY(2003,4277,
>
>
NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1),MDSYS.SDO_ORDINATE_ARRAY(379875

> .0,98124.2,380824.0,98183.0,
>
> 380907.0,97110.4,379896.0,97070.2,379875.0,98124.2)),'distance=20.0')
> !=
> 'TRUE';
>
>
>
>   COUNT(*)
>
> ----------
>
>      19663
>
>
>
>
>
>
>
> The GeoServer  trace is as below:
>
>
>
>
>
>
>
> 49940158 [WARNING] org.vfny.geoserver.servlets.AbstractService -
> service
> except
>
> ion while executing request:
>
> Request: null
>
>  output format:GML2
>
>  max features:2147483647
>
>  version:
>
>  queries:
>
>   Query []
>
>    feature type: LandRegistry:LRPOLYS
>
>    filter: [ GEOMETRY beyond POLYGON ((379875 98124.2, 380824 98183,
> 380907 9711
>
> 0.4, 379896 97070.2, 379875 98124.2)), distance: 20.0 ]
>
>    [properties:  ALL ]
>
>
>
> cause: org.geotools.data.DataSourceException: Could not count
>
>  49940158 [WARNING] org.vfny.geoserver.ServiceException - encountered
> error: org
>
> .geotools.data.DataSourceException: Could not count
>
> StackTrace: org.geotools.data.DataSourceException: Could not count
>
>         at
> org.geotools.data.jdbc.JDBCFeatureSource.count(JDBCFeatureSource.java
>
> :416)
>
>         at
> org.geotools.data.jdbc.JDBCFeatureSource$1.getCount(JDBCFeatureSource
>
> .java:229)
>
>         at
> org.vfny.geoserver.wfs.responses.FeatureResponse.execute(FeatureRespo
>
> nse.java:286)
>
>         at
> org.vfny.geoserver.wfs.responses.FeatureResponse.execute(FeatureRespo
>
> nse.java:143)
>
>         at
> org.vfny.geoserver.servlets.AbstractService.doService(AbstractService
>
> .java:408)
>
>         at
> org.vfny.geoserver.servlets.AbstractService.doPost(AbstractService.ja
>
> va:344)
>
>         at
> org.vfny.geoserver.wfs.servlets.WfsDispatcher.doResponse(WfsDispatche
>
> r.java:246)
>
>         at
> org.vfny.geoserver.wfs.servlets.WfsDispatcher.doPost(WfsDispatcher.ja
>
> va:135)
>
>         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>
>         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>
>         at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358
>
> )
>
>         at
> org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati
>
> onHandler.java:294)
>
>         at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:5
>
> 67)
>
>         at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
>
>         at
> org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplication
>
> Context.java:525)
>
>         at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
>
>         at org.mortbay.http.HttpServer.service(HttpServer.java:879)
>
>         at
> org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
>
>         at
> org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:961)
>
>         at
> org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
>
>         at
> org.mortbay.http.SocketListener.handleConnection(SocketListener.java:
>
> 197)
>
>         at
> org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:276)
>
>         at
> org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511)
>
> Caused by: java.sql.SQLException: ORA-29902: error in executing
> ODCIIndexStart()
>
>  routine
>
> ORA-13207: incorrect use of the [SDO_WITHIN_DISTANCE] operator
>
> ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 391
>
> ORA-06512: at line 1
>




----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users