[Geoserver-users] Oracle View Problem

Hi,

We have a table that includes X and Y columns for latitude and longitudes. We created a view with geom column from this table as follows :

(SDO_GEOMETRY(2001, 4326, SDO_POINT_TYPE (ST.Y, ST.X, NULL), NULL, NULL))

Then we published this view from GeoServer and try to get the WMS request.

The WMS request has following error :

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

Rendering process failed
java.io.IOExceptionORA-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 88

As far as I searched, this was a problem in Oracle 9, but we are working on 11g.

How can we get rid of this error? There was no luck with creating spatial index on views.

Best.

A.

Hi Alper,
nope, as far as I know, the problem is still there, known issue, we cannot query
data that does not have a spatial index:
https://osgeo-org.atlassian.net/browse/GEOT-4768

Some development is needed to recognize the source has no spatial indexes,
and change the spatial operators we use for bbox queries

Cheers
Andrea

···

On Wed, May 13, 2015 at 4:10 PM, Alper Dinçer <alperd.web@anonymised.com> wrote:

Hi,

We have a table that includes X and Y columns for latitude and longitudes. We created a view with geom column from this table as follows :

(SDO_GEOMETRY(2001, 4326, SDO_POINT_TYPE (ST.Y, ST.X, NULL), NULL, NULL))

Then we published this view from GeoServer and try to get the WMS request.

The WMS request has following error :

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

Rendering process failed
java.io.IOExceptionORA-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 88

As far as I searched, this was a problem in Oracle 9, but we are working on 11g.

How can we get rid of this error? There was no luck with creating spatial index on views.

Best.

A.


One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

==

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

==

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


Have you tried creating a spatial function-based index on the table?

http://docs.oracle.com/cd/E11882_01/appdev.112/e11830/sdo_exten.htm#SPATL799

See the example 9.2.1 - it creates a function creating the geometry out of the X,Y values, and then uses that for indexing and querying. Hopefully it’s possible to define a view hiding the existence of the function, but still using the spatial index. In this case, GeoServer might be able to query the view (using SDO_FILTER as per normal) and Oracle will support the query since it can use the index.

Ironically, in my experience when working with tables containing XY data, it’s at least as fast to simply use normal B-tree indexes and range queries. However, it doesn’t sound like this can be made to work in GeoServer (yet…)

···

On Wed, May 13, 2015 at 7:10 AM, Alper Dinçer <alperd.web@anonymised.com> wrote:

Hi,

We have a table that includes X and Y columns for latitude and longitudes. We created a view with geom column from this table as follows :

(SDO_GEOMETRY(2001, 4326, SDO_POINT_TYPE (ST.Y, ST.X, NULL), NULL, NULL))

Then we published this view from GeoServer and try to get the WMS request.

The WMS request has following error :

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

Rendering process failed
java.io.IOExceptionORA-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 88

As far as I searched, this was a problem in Oracle 9, but we are working on 11g.

How can we get rid of this error? There was no luck with creating spatial index on views.

Best.

A.


One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Also see this page, which gives a good example of using the function-based index technique:

http://gis.stackexchange.com/questions/92554/can-i-create-an-oracle-spatial-view-from-a-non-spatial-table

That page also mentions the possiblity of defining a materialized view on the underlying table, which should be able to support a spatial index directly.

···

On Wed, May 13, 2015 at 9:27 AM, Martin Davis <mtnclimb@anonymised.com> wrote:

Have you tried creating a spatial function-based index on the table?

http://docs.oracle.com/cd/E11882_01/appdev.112/e11830/sdo_exten.htm#SPATL799

See the example 9.2.1 - it creates a function creating the geometry out of the X,Y values, and then uses that for indexing and querying. Hopefully it’s possible to define a view hiding the existence of the function, but still using the spatial index. In this case, GeoServer might be able to query the view (using SDO_FILTER as per normal) and Oracle will support the query since it can use the index.

Ironically, in my experience when working with tables containing XY data, it’s at least as fast to simply use normal B-tree indexes and range queries. However, it doesn’t sound like this can be made to work in GeoServer (yet…)

On Wed, May 13, 2015 at 7:10 AM, Alper Dinçer <alperd.web@anonymised.com> wrote:

Hi,

We have a table that includes X and Y columns for latitude and longitudes. We created a view with geom column from this table as follows :

(SDO_GEOMETRY(2001, 4326, SDO_POINT_TYPE (ST.Y, ST.X, NULL), NULL, NULL))

Then we published this view from GeoServer and try to get the WMS request.

The WMS request has following error :

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

Rendering process failed
java.io.IOExceptionORA-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 88

As far as I searched, this was a problem in Oracle 9, but we are working on 11g.

How can we get rid of this error? There was no luck with creating spatial index on views.