English

Error: OCI-2216x: given index [1048576] must be in the range of [0] to [1048575]

Error Message

When loading data to ArcSDE with storage type selected to be SDO_GEOMETRY, user gets error message:

OCI-2216x: given index [1048576] must be in the range of [0] to [1048575]

Note:
This can also apply to the following: OCI-22163, OCI-22164, or OCI-22165.

Cause

The maximum size of a single geometry object defined by Oracle (up to 11.1.0.7.0) is:

SQL> DESC MDSYS.SDO_ORDINATE_ARRAY;
MDSYS.SDO_ORDINATE_ARRAY VARRAY(1048576) OF NUMBER

So for 2D data, there can be (1048576 - 1)/2 (about 524,287) vertices in an single SDO_GEOMETRY.

For 3D data, there can be (1048576 - 1)/3(49,525) vertices in an single SDO_GEOMETRY.

That is as big as a single SDO_GEOMETRY can get.

Solution or Workaround

If a user has a single geometry that has more vertices than the maximum value, then the user needs to split it up or generalize it to get it into Oracle.