sdo_geom.sdo_length error in 12.1.0.2.0 (Doc ID 2252013.1)

Last updated on APRIL 21, 2017

Applies to:

Oracle Spatial and Graph - Version 12.1.0.2 to 12.1.0.2 [Release 12.1]
Information in this document applies to any platform.

Symptoms

Using the following geometry as an example reveals 2 problems:

SDO_GEOMETRY(3006, NULL, NULL,
SDO_ELEM_INFO_ARRAY(1,2,1, 7,2,1),
SDO_ORDINATE_ARRAY(10,10,0, 10,20,0, 20,10,0, 20,20,0)
)

(1) Transforming to LRS without passing any measure info fails with a Java call error:

SQL> select sdo_lrs.convert_to_lrs_geom(SDO_GEOMETRY(3006, NULL, NULL,
SDO_ELEM_INFO_ARRAY(1,2,1, 7,2,1), SDO_ORDINATE_ARRAY(10,10,0, 10,20,0,
20,10,0, 20,20,0))) from dual;
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
java.lang.ArrayIndexOutOfBoundsException
ORA-06512: at "MDSYS.SDO_LRS", line 5153

(2) Transforming to LRS with explicit start and end measures completes
successfully:

SQL> select sdo_lrs.convert_to_lrs_geom(SDO_GEOMETRY(3006, NULL, NULL,
SDO_ELEM_INFO_ARRAY(1,2,1, 7,2,1), SDO_ORDINATE_ARRAY(10,10,0, 10,20,0,
20,10,0, 20,20,0)),100,200) from dual;

SDO_LRS.CONVERT_TO_LRS_GEOM(SDO_GEOMETRY(3006,NULL,NULL,SDO_ELEM_INFO_ARRAY(1,2
-------------------------------------------------------------------------------
SDO_GEOMETRY(4406, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1, 9, 2, 1),
SDO_ORDINATE_ARRAY(10, 10, 0, 100, 10, 20, 0, 150, 20, 10, 0, 150, 20, 20, 0,
200))

1 row selected.

But measuring the length of that LRS shape fails:

SQL> select
sdo_geom.sdo_length(sdo_lrs.convert_to_lrs_geom(SDO_GEOMETRY(3006, NULL,
NULL, SDO_ELEM_INFO_ARRAY(1,2,1, 7,2,1), SDO_ORDINATE_ARRAY(10,10,0, 10,20,0,
20,10,0, 20,20,0)),100,200),0.005) from dual;
ORA-29532: Java call terminated by uncaught Java exception:
java.lang.ArrayIndexOutOfBoundsException
ORA-06512: at "MDSYS.SDO_JAVA_STP", line 254
ORA-06512: at "MDSYS.SDO_3GL", line 3183
ORA-06512: at "MDSYS.SDO_GEOM", line 1813
ORA-06512: at "MDSYS.SDO_GEOM", line 1755
ORA-06512: at line 1

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms