[Gvsig_english] Problems using geoBD with Oracle layer

Wolfgang Qual Wolfgang.Qual at gmx.net
Wed May 30 14:31:55 CEST 2007


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/>  
> 
> ________________________________
> 
> 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


More information about the Gvsig_internacional mailing list