Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 2.6.5
-
Fix Version/s: None
-
Component/s: jdbc-oracle plugin
-
Labels:None
Description
I have a GeometryCollection containg a point and line which fails to be correctly parsed with SDO class. Throws exception:
java.lang.IllegalArgumentException: ELEM_INFO STARTING_OFFSET 899 inconsistent with ORDINATES length 466
at org.geotools.data.oracle.sdo.SDO.createPoint(SDO.java:2365)
at org.geotools.data.oracle.sdo.SDO.createCollection(SDO.java:2911)
at org.geotools.data.oracle.sdo.SDO.create(SDO.java:2335)
at org.geotools.data.oracle.sdo.SDO.create(SDO.java:2289)
Offending line in SDO class is:
if (!(STARTING_OFFSET >= 1) || !(STARTING_OFFSET <= coords.size()))
throw new IllegalArgumentException("ELEM_INFO STARTING_OFFSET "STARTING_OFFSET" inconsistent with ORDINATES length "+coords.size());
This is wrong as it fails to take into account the dimensions. STARTING_OFFSET should be compared against ordinateSize( coords, GTYPE ) as it is in other parts of the code. See comments on ordinateSize() method