[Gvsig_english] Problems using geoBD with Oracle layer
Wolfgang Qual
Wolfgang.Qual at gmx.net
Fri Jun 1 08:55:25 CEST 2007
Hi Jorge,
the administrator of the oracle database told me that the spatial index is not available for the specified user. Therefore, a view was created. Result: the geometry column seems to be detected now by gvSIG (it is visible within the geoBD-Dialogue-box).
However, displaying the layer is still not possible - there seems to be an error with the coordinate system. From the logfile:
INFO AWT-EventQueue-1 com.hardcode.gdbms.engine.data.AutomaticDataSource - timer start
INFO AWT-EventQueue-1 com.hardcode.gdbms.engine.data.AutomaticDataSource - timer reset
INFO AWT-EventQueue-1 com.hardcode.gdbms.engine.data.AutomaticDataSource - timer start
ERROR AWT-EventQueue-1 es.prodevelop.cit.gvsig.fmap.drivers.jdbc.oracle.OracleSpatialDriver - Oracle Spatial code not found in table: 82032
ERROR AWT-EventQueue-1 es.prodevelop.cit.gvsig.fmap.drivers.jdbc.oracle.OracleSpatialDriver - Error with SQL statement. Unknown Oracle code: 82032
INFO AWT-EventQueue-1 com.hardcode.gdbms.engine.data.AutomaticDataSource - timer start
INFO AWT-EventQueue-1 com.hardcode.gdbms.engine.data.AutomaticDataSource - timer reset
DEBUG Thread-13 es.prodevelop.cit.gvsig.fmap.drivers.jdbc.oracle.OracleSpatialDriver - SQL para leer ids: select rowid, c.GEOM.SDO_ELEM_INFO from RGBUSER1.MY_GEBAEUDE c
INFO Thread-13 es.prodevelop.cit.gvsig.fmap.drivers.jdbc.oracle.OracleSpatialDriver - FETCH_SIZE = 15000
INFO AWT-EventQueue-1 com.hardcode.gdbms.engine.data.AutomaticDataSource - timer start
DEBUG Thread-13 es.prodevelop.cit.gvsig.fmap.drivers.jdbc.oracle.OracleSpatialDriver - Beginning of result set:
INFO AWT-EventQueue-1 com.hardcode.gdbms.engine.data.AutomaticDataSource - timer reset
INFO Thread-13 es.prodevelop.cit.gvsig.fmap.drivers.jdbc.oracle.OracleSpatialDriver - IDs read: 0
INFO AWT-EventQueue-1 com.hardcode.gdbms.engine.data.AutomaticDataSource - datasource closed
DEBUG AWT-EventQueue-1 com.iver.cit.gvsig.fmap.layers.FLyrDefault - setTocStatusImage sun.awt.motif.X11Image at 7e9505 sobre capa RGBUSER1.MY_GEBAEUDE
DEBUG AWT-EventQueue-1 com.iver.andami.messages.NotificationManager - org.gvsig.crs.CrsException: org.gvsig.crs.proj.CrsProjException: +proj=longlat +ellps=WGS84 +no_defs
org.gvsig.crs.CrsException: org.gvsig.crs.proj.CrsProjException: +proj=longlat +ellps=WGS84 +no_defs
at org.gvsig.crs.COperation.operate(COperation.java:107)
at org.gvsig.crs.COperation.convert(COperation.java:156)
at com.iver.cit.gvsig.fmap.layers.FLyrVect.getFullExtent(FLyrVect.java:320)
at com.iver.cit.gvsig.fmap.MapContext$LayerEventListener.layerAdded(MapContext.java:802)
at com.iver.cit.gvsig.fmap.layers.FLayers.callLayerAdded(FLayers.java:748)
at com.iver.cit.gvsig.fmap.layers.FLayers.addLayer(FLayers.java:189)
at com.iver.cit.gvsig.fmap.layers.FLayers.addLayer(FLayers.java:163)
at com.iver.cit.gvsig.AddLayer.loadGenericWizardPanelLayers(AddLayer.java:427)
at com.iver.cit.gvsig.AddLayer.addLayers(AddLayer.java:466)
at com.iver.cit.gvsig.AddLayer.execute(AddLayer.java:193)
at com.iver.andami.plugins.ExtensionDecorator.execute(ExtensionDecorator.java:87)
at com.iver.andami.ui.mdiFrame.MDIFrame.actionPerformed(MDIFrame.java:626)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
at java.awt.Component.processMouseEvent(Component.java:5100)
at java.awt.Component.processEvent(Component.java:4897)
at java.awt.Container.processEvent(Container.java:1569)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:480)
at com.iver.andami.ui.AndamiEventQueue.dispatchEvent(AndamiEventQueue.java:58)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
Caused by: org.gvsig.crs.proj.CrsProjException: +proj=longlat +ellps=WGS84 +no_defs
at org.gvsig.crs.proj.JNIBaseCrs.getPtr(JNIBaseCrs.java:102)
at org.gvsig.crs.proj.JNIBaseCrs.operate(JNIBaseCrs.java:131)
at org.gvsig.crs.COperation.operate(COperation.java:101)
... 37 more
WARN AWT-EventQueue-1 com.iver.andami.PluginServices - Plugin com.iver.core -- Konnte Übersetzung nicht finden für: Informationskonsole
WARN AWT-EventQueue-1 com.iver.andami.PluginServices - Plugin com.iver.core -- Konnte Übersetzung nicht finden für: Informationskonsole
WARN AWT-EventQueue-1 com.iver.andami.PluginServices - Plugin com.iver.core -- Konnte Übersetzung nicht finden für: Aktiviert das fenster
INFO Thread-13 es.prodevelop.cit.gvsig.fmap.drivers.jdbc.oracle.OracleSpatialDriver - IDs read: 5.000
INFO Thread-13 es.prodevelop.cit.gvsig.fmap.drivers.jdbc.oracle.OracleSpatialDriver - IDs read: 10.000
DEBUG AWT-EventQueue-1 com.iver.core.mdiManager.NewSkin - Activando Informationskonsole
DEBUG AWT-EventQueue-1 com.iver.andami.ui.mdiFrame.MDIFrame - Memoria total: 45468584
DEBUG AWT-EventQueue-1 com.iver.andami.messages.NotificationManager - org.gvsig.crs.CrsException: org.gvsig.crs.proj.CrsProjException: +proj=longlat +ellps=WGS84 +no_defs
org.gvsig.crs.CrsException: org.gvsig.crs.proj.CrsProjException: +proj=longlat +ellps=WGS84 +no_defs
at org.gvsig.crs.COperation.operate(COperation.java:107)
[...]
Caused by: org.gvsig.crs.proj.CrsProjException: +proj=longlat +ellps=WGS84 +no_defs
at org.gvsig.crs.proj.JNIBaseCrs.getPtr(JNIBaseCrs.java:102)
at org.gvsig.crs.proj.JNIBaseCrs.operate(JNIBaseCrs.java:131)
at org.gvsig.crs.COperation.operate(COperation.java:101)
... 37 more
DEBUG AWT-EventQueue-1 com.iver.andami.messages.NotificationManager - Anwendungsfehler
java.lang.NullPointerException
This is kind of strange, as I used EPSG-code for DHDN Germany, Zone 4 (Gauss-Krüger, Zone 4) for the projection of the view - and the projection information of the oracle layer should contain the same information (SRID 82032).
At least, one step further, I guess.
Best regards,
Wolfgang
------8<-----------------------------
-------- Original-Nachricht --------
Datum: Wed, 30 May 2007 16:42:23 +0200
Von: "Jorge Sanz" <jsanz at prodevelop.es>
An: gvsig_internacional at runas.cap.gva.es
Betreff: RE: RE: [Gvsig_english] Problems using geoBD with Oracle layer
> To know the spatial indexes of a table you can execute that SQL:
>
> SELECT INDEX_NAME,STATUS
> >FROM USER_INDEXES
> WHERE TABLE_NAME='MYTABLE' AND ITYP_NAME='SPATIAL_INDEX'
> ORDER BY INDEX_NAME
>
> By the way, there is a known bug related with spatial indexes reported
> some days ago. The next release of the extension will have it resolved. Sorry
> for the inconvenience...
>
> And about ogr2ogr... the log is showing that the SRID (the Oracle specific
> code with the coordinate system and datum information) is null. I've
> experienced some problems with the new JCRS extension and the Oracle driver, and
> it seems that is related with that situation (a layer/table without
> reference information). We will work on it.
>
> Thank you for your comments.
>
> Regards
>
> Jorge Gaspar Sanz Salinas
> Ingeniero en Geodesia y Cartografía
> Prodevelop S.L. - Valencia - España
> Tlf.: 96.351.06.12 - Fax: 96.351.09.68
> jsanz[en]prodevelop[punto]es
> http://www.prodevelop.es <http://www.prodevelop.es/>
>
> ________________________________
>
> De: Wolfgang Qual [mailto:Wolfgang.Qual at gmx.net]
> Enviado el: mié 30/05/2007 14:31
> Para: Users and Developers mailing list;
> gvsig_internacional at runas.cap.gva.es
> CC: Jorge Sanz
> Asunto: Re: RE: [Gvsig_english] Problems using geoBD with Oracle layer
>
>
>
> Hello Jorge,
> thanks for your comment. I browsed through the gvSIG-logfile, and found
> that the layers seem to have this information, like
>
> "DEBUG AWT-EventQueue-1
> es.prodevelop.cit.gvsig.fmap.drivers.jdbc.oracle.OracleSpatialDriver - ======================================================
> DEBUG AWT-EventQueue-1
> es.prodevelop.cit.gvsig.fmap.drivers.jdbc.oracle.OracleSpatialDriver - OWNER: VAGRUND
> DEBUG AWT-EventQueue-1
> es.prodevelop.cit.gvsig.fmap.drivers.jdbc.oracle.OracleSpatialDriver - TABLE_NAME: DIST_SYMBOL
> DEBUG AWT-EventQueue-1
> es.prodevelop.cit.gvsig.fmap.drivers.jdbc.oracle.OracleSpatialDriver - COLUMN_NAME: GEOM
> DEBUG AWT-EventQueue-1
> es.prodevelop.cit.gvsig.fmap.drivers.jdbc.oracle.OracleSpatialDriver - SRID: 82032
> DEBUG AWT-EventQueue-1
> es.prodevelop.cit.gvsig.fmap.drivers.jdbc.oracle.OracleSpatialDriver - DIMINFO: DIMENSIONS: 3
> DIMENSION 0: , NAME: X, MIN: 4356000, MAX: 4612000, TOL: 0.0005
> DIMENSION 1: , NAME: Y, MIN: 5240000, MAX: 5496000, TOL: 0.0005
> DIMENSION 2: , NAME: Z, MIN: -10000, MAX: 10000, TOL: 0.0005
> DEBUG AWT-EventQueue-1
> es.prodevelop.cit.gvsig.fmap.drivers.jdbc.oracle.OracleSpatialDriver - "
>
> Ok. What I do not know yet is whether this layer has a spatial index or
> not. I'll try to find out this.
>
>
> Additionally, I added a table to this database on my own using ogr2ogr.
> The geometry column of this layer is detected by gvSIG. However this layer
> cannot be added to my view -
>
> The layer in the log:
> DEBUG AWT-EventQueue-1
> es.prodevelop.cit.gvsig.fmap.drivers.jdbc.oracle.OracleSpatialDriver - OWNER: RGBUSER1
> DEBUG AWT-EventQueue-1
> es.prodevelop.cit.gvsig.fmap.drivers.jdbc.oracle.OracleSpatialDriver - TABLE_NAME: BESP_KAMIN
> DEBUG AWT-EventQueue-1
> es.prodevelop.cit.gvsig.fmap.drivers.jdbc.oracle.OracleSpatialDriver - COLUMN_NAME: ORA_GEOMETRY
> DEBUG AWT-EventQueue-1
> es.prodevelop.cit.gvsig.fmap.drivers.jdbc.oracle.OracleSpatialDriver - SRID: null
> DEBUG AWT-EventQueue-1
> es.prodevelop.cit.gvsig.fmap.drivers.jdbc.oracle.OracleSpatialDriver - DIMINFO: DIMENSIONS: 3
> DIMENSION 0: , NAME: X, MIN: 4452546.0175, MAX: 4479482.3834, TOL: 0.001
> DIMENSION 1: , NAME: Y, MIN: 5324955.4072, MAX: 5345695.8636, TOL: 0.001
> DIMENSION 2: , NAME: Z, MIN: -100000, MAX: 100000, TOL: 0.002
> DEBUG AWT-EventQueue-1
> es.prodevelop.cit.gvsig.fmap.drivers.jdbc.oracle.OracleSpatialDriver - ======================================================
>
> and the error message:
> DEBUG AWT-EventQueue-1 com.iver.andami.messages.NotificationManager -
> org.gvsig.crs.CrsException: org.gvsig.crs.proj.CrsProjException: +proj=tmerc
> +lat_0=0 +lon_0=11.99999999999999 +k=1.000000 +x_0=4500000 +y_0=0
> +ellps=bessel +units=m +no_defs
> org.gvsig.crs.CrsException: org.gvsig.crs.proj.CrsProjException:
> +proj=tmerc +lat_0=0 +lon_0=11.99999999999999 +k=1.000000 +x_0=4500000 +y_0=0
> +ellps=bessel +units=m +no_defs
> at org.gvsig.crs.COperation.operate(COperation.java:107)
> at org.gvsig.crs.COperation.convert(COperation.java:156)
> at
> com.iver.cit.gvsig.fmap.layers.FLyrVect.getFullExtent(FLyrVect.java:321)
> at
> com.iver.cit.gvsig.fmap.MapContext$LayerEventListener.layerAdded(MapContext.java:802)
> at
> com.iver.cit.gvsig.fmap.layers.FLayers.callLayerAdded(FLayers.java:748)
> at
> com.iver.cit.gvsig.fmap.layers.FLayers.addLayer(FLayers.java:189)
> at
> com.iver.cit.gvsig.fmap.layers.FLayers.addLayer(FLayers.java:163)
> at
> com.iver.cit.gvsig.AddLayer.loadGenericWizardPanelLayers(AddLayer.java:427)
> at com.iver.cit.gvsig.AddLayer.addLayers(AddLayer.java:466)
> at com.iver.cit.gvsig.AddLayer.execute(AddLayer.java:193)
> at
> com.iver.andami.plugins.ExtensionDecorator.execute(ExtensionDecorator.java:87)
> at
> com.iver.andami.ui.mdiFrame.MDIFrame.actionPerformed(MDIFrame.java:626)
> at
> javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
> at
> javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
> at
> javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
> at
> javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
> at
> javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
> at
> java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
> at
> java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
> at java.awt.Component.processMouseEvent(Component.java:5100)
> at java.awt.Component.processEvent(Component.java:4897)
> at java.awt.Container.processEvent(Container.java:1569)
> at java.awt.Component.dispatchEventImpl(Component.java:3615)
> at java.awt.Container.dispatchEventImpl(Container.java:1627)
> at java.awt.Component.dispatchEvent(Component.java:3477)
> at
> java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
> at
> java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
> at
> java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
> at java.awt.Container.dispatchEventImpl(Container.java:1613)
> at java.awt.Window.dispatchEventImpl(Window.java:1606)
> at java.awt.Component.dispatchEvent(Component.java:3477)
> at java.awt.EventQueue.dispatchEvent(EventQueue.java:480)
> at
> com.iver.andami.ui.AndamiEventQueue.dispatchEvent(AndamiEventQueue.java:58)
> at
> java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
> at
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
> at
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
> at
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
> at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
> Caused by: org.gvsig.crs.proj.CrsProjException: +proj=tmerc +lat_0=0
> +lon_0=11.99999999999999 +k=1.000000 +x_0=4500000 +y_0=0 +ellps=bessel +units=m
> +no_defs
> at org.gvsig.crs.proj.JNIBaseCrs.getPtr(JNIBaseCrs.java:102)
> at org.gvsig.crs.proj.JNIBaseCrs.operate(JNIBaseCrs.java:131)
> at org.gvsig.crs.COperation.operate(COperation.java:101)
> ... 37 more
> DEBUG AWT-EventQueue-1 com.iver.andami.messages.NotificationManager -
> Anwendungsfehler
> java.lang.NullPointerException
>
>
> I just don't really get it. Ideas?
>
> Best regards,
> Wolfgang
>
>
>
>
>
> -------- Original-Nachricht --------
> Datum: Wed, 30 May 2007 13:04:53 +0200
> Von: "Jorge Sanz" <jsanz at prodevelop.es>
> An: "Users and Developers mailing list"
> <gvsig_internacional at runas.cap.gva.es>
> Betreff: RE: [Gvsig_english] Problems using geoBD with Oracle layer
>
> > Hi,
> >
> > gvSIG needs that Oracle Spatial Geometry columns have an spatial index.
> > That is to say, you must create a spatial index on your GEOM column to
> be
> > able to make spatial queries (gvSIG makes spatial queries to retrieve
> data
> > from the database). For example:
> >
> > CREATE INDEX MYTABLE_SPIDX ON MYTABLE (MYGEOMCOL)
> > INDEXTYPE IS MDSYS.SPATIAL_INDEX
> > PARAMETERS ('');
> >
> > In addition, before you create the Index, you must insert metadata about
> > your table into the MDSYS.USER_SDO_GEOM_METADATA view. For example:
> >
> > INSERT INTO mdsys.USER_SDO_GEOM_METADATA
> > (TABLE_NAME,COLUMN_NAME,DIMINFO,SRID)
> > VALUES ('MYTABLE','MYGEOMCOL',
> > mdsys.SDO_DIM_ARRAY(mdsys.SDO_DIM_ELEMENT('X', -180, 180, 0.001),
> > mdsys.SDO_DIM_ELEMENT('Y', -90, 90, 0.001)), 8307);
> >
> > Regards
> >
> > Jorge Gaspar Sanz Salinas
> > Ingeniero en Geodesia y Cartografía
> > Prodevelop S.L. - Valencia - España
> > Tlf.: 96.351.06.12 - Fax: 96.351.09.68
> > jsanz[en]prodevelop[punto]es
> > http://www.prodevelop.es <http://www.prodevelop.es/>
> <http://www.prodevelop.es/>
> >
> > ________________________________
> >
> > De: gvsig_internacional-bounces at runas.cap.gva.es en nombre de Wolfgang
> > Qual
> > Enviado el: mié 30/05/2007 11:26
> > Para: gvsig_internacional at runas.cap.gva.es
> > Asunto: [Gvsig_english] Problems using geoBD with Oracle layer
> >
> >
> >
> > Hi list,
> > I just had the possibility to test geoBD-extension with an Oracle
> Spatial
> > Connection.
> > I could connect to the Oracle Database, all layers appear in the
> > GeoBD-dialogue box.
> > However, when trying to activate one of them, the error message appears:
> > "Error while getting valid geometry fields: no spatial indexes found on
> > geometry field of table [tablename]".
> > This is strange, as I see the column "GEOM" in the list of columns of
> this
> > table. Is there a reason, why this column is not recognised? Geom is of
> > type MDSYS.SDO_GEOMETRY.
> >
> > I would be grateful for any comments!
> > Best,
> > Wolfgang
> >
> > --
> > Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> > Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
> > _______________________________________________
> > Gvsig_internacional mailing list
> > Gvsig_internacional at runas.cap.gva.es
> > http://runas.cap.gva.es/mailman/listinfo/gvsig_internacional
> >
> >
>
> --
> Psssst! Schon vom neuen GMX MultiMessenger gehört?
> Der kanns mit allen: http://www.gmx.net/de/go/multimessenger
>
>
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
More information about the Gvsig_internacional
mailing list