Issue Type: Bug Bug
Affects Versions: 9.0
Assignee: Andrea Aime
Components: jdbc-oracle plugin
Created: 29/May/13 10:45 AM
Description:

There are exception in When 1-digit value used for sdo_gtype.

INFO | jvm 1 | 2013/05/29 10:53:05 | 29 май 10:53:05 ERROR [geotools.rendering] - / by zero
INFO | jvm 1 | 2013/05/29 10:53:05 | java.lang.ArithmeticException: / by zero
INFO | jvm 1 | 2013/05/29 10:53:05 | at org.geotools.data.oracle.sdo.SDO.coordinates(SDO.java:2082)
INFO | jvm 1 | 2013/05/29 10:53:05 | at org.geotools.data.oracle.sdo.SDO.create(SDO.java:2379)
INFO | jvm 1 | 2013/05/29 10:53:05 | at org.geotools.data.oracle.sdo.GeometryConverter.asGeometry(GeometryConverter.java:125)
INFO | jvm 1 | 2013/05/29 10:53:05 | at org.geotools.data.oracle.OracleDialect.readGeometry(OracleDialect.java:506)
INFO | jvm 1 | 2013/05/29 10:53:05 | at org.geotools.data.oracle.OracleDialect.readGeometry(OracleDialect.java:492)
INFO | jvm 1 | 2013/05/29 10:53:05 | at org.geotools.data.oracle.OracleDialect.decodeGeometryValue(OracleDialect.java:455)

As it written in Oracle documentation (http://docs.oracle.com/cd/B10500_01/appdev.920/a96630/sdo_objrelschema.htm#sthref192) in this case Oracle Spatial determines the number of dimensions from the DIMINFO column of the metadata views.

I can't find way to get schema and table name to check metadata view and use workaround:

make addition methods in OracleDialect

  • readGeometry with addition parameter int defaultDimension
    and add same parameter in GeometryConverter.asGeometry with small fix:
            int _GType = asInteger( data[0], 0 );
            final int GTYPE = (_GType<1000)?_GType+defaultDimensions*1000:_GType; 
    

    and change OracleDialect.decodeGeometryValue:

            Geometry geom = readGeometry( rs, column, factory, cx, descriptor.getCoordinateReferenceSystem().getCoordinateSystem().getDimension());
    




    
Project: GeoTools
Priority: Major Major
Reporter: Sergey Arsenyev
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to