English

Error: load_buffer (-51)

Error Message

Note:
The content in this article pertains to ArcGIS versions 8.x only. Later versions of ArcGIS may contain different functionality, as well as different names and locations for menus, commands and geoprocessing tools.

This error is returned in the sde.errlog when panning, zooming, or querying a registered Oracle spatial layer:

load_buffer (-51)

Cause

The error is the result of an invalid MDSYS.SDO_DIM_ELEMENT. Refer to the Oracle documentation for more information about this parameter.

Solution or Workaround

Change MDSYS.SDO_DIM_ELEMENT Extent values based on Oracle calculations or a best guess. You can use the Oracle tool SDO_TUNE.EXTENT_OF to determine the minimum bounding rectangle of the data in a layer.

SQL example for an SDO layer that fails:

CREATE TABLE cultitem(
CULT_ITEM_INDX NUMBER(6) NOT NULL,
CULT_SET_CHVN VARCHAR2(6) NOT NULL,
GEOMETRY  MDSYS.SDO_GEOMETRY);

INSERT  INTO cultitem VALUES (940,'BBQ459',MDSYS.SDO_GEOMETRY(
  2003,NULL,NULL,
  MDSYS.SDO_ELEM_INFO_ARRAY(1, 3, 1),
  MDSYS.SDO_ORDINATE_ARRAY(
  -97.11661, 29.6236114, -97.13016, 29.6233806, -97.129929, 29.6014086,
-97.116456,
  29.6016074, -97.11661, 29.6236114)));

INSERT INTO USER_SDO_GEOM_METADATA
values(
'CULTITEM','GEOMETRY',
   MDSYS.SDO_DIM_ARRAY(   
    MDSYS.SDO_DIM_ELEMENT('X', -180, 180, 0.000000005),
    MDSYS.SDO_DIM_ELEMENT('Y', -90, 90, 0.000000005)
     ),
  NULL   -- SRID (reserved for future Spatial releases)
);

commit;

CREATE INDEX cultitem_hybrid ON CULTITEM(GEOMETRY)
  INDEXTYPE IS MDSYS.SPATIAL_INDEX PARAMETERS('SDO_LEVEL=10
SDO_NUMTILES=2');

sdelayer -o register -l cultitem,goemetry -e a -c cult_item_indx
-k sdo_geometry -S "Culture Item Oracle Spatial" -u hhwa -p pwd 

SQL examples that work:
 
CREATE TABLE cultitem(
CULT_ITEM_INDX NUMBER(6) NOT NULL,
CULT_SET_CHVN VARCHAR2(6) NOT NULL,
GEOMETRY  MDSYS.SDO_GEOMETRY);

INSERT  INTO cultitem VALUES (940,'BBQ459',MDSYS.SDO_GEOMETRY(
  2003,NULL,NULL,
  MDSYS.SDO_ELEM_INFO_ARRAY(1,3, 1),
  MDSYS.SDO_ORDINATE_ARRAY(
  -97.11661, 29.6236114, -97.13016, 29.6233806, -97.129929, 
29.6014086,
-97.116456,
  29.6016074, -97.11661, 29.6236114)));

INSERT INTO USER_SDO_GEOM_METADATA
values(
'CULTITEM','GEOMETRY',
   MDSYS.SDO_DIM_ARRAY(   
    MDSYS.SDO_DIM_ELEMENT('X', -100, 0, 0.0000005),
    MDSYS.SDO_DIM_ELEMENT('Y', 0, 90, 0.0000005)
     ),
  NULL   -- SRID (reserved for future Spatial releases)
);

commit;

CREATE INDEX cultitem_fixed ON CULTITEM(GEOMETRY)
  INDEXTYPE IS MDSYS.SPATIAL_INDEX PARAMETERS('SDO_LEVEL=8'); 
 
CREATE TABLE cola_markets ( mkt_id NUMBER(6) NOT NULL, name VARCHAR2(32), 
	shape MDSYS.SDO_GEOMETRY); 

INSERT INTO cola_markets VALUES( 2, 'cola_b', MDSYS.SDO_GEOMETRY( 2003, NULL, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1), 
	MDSYS.SDO_ORDINATE_ARRAY(5,1, 8,1, 8,6, 5,7, 5,1) ) ); 

INSERT INTO cola_markets VALUES( 3, 'cola_c', MDSYS.SDO_GEOMETRY( 2003, NULL, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1),
	MDSYS.SDO_ORDINATE_ARRAY(3,3, 6,3, 6,5, 4,5, 3,3) ) ); 

INSERT INTO USER_SDO_GEOM_METADATA VALUES
	( 'cola_markets', 'shape', MDSYS.SDO_DIM_ARRAY( MDSYS.SDO_DIM_ELEMENT('X', 0, 20, 0.005), 
	MDSYS.SDO_DIM_ELEMENT('Y', 0, 20, 0.005) ), NULL); 

CREATE INDEX cola_spatial_idx ON cola_markets(shape) INDEXTYPE IS MDSYS.SPATIAL_INDEX PARAMETERS('SDO_LEVEL = 8'); 

sdelayer -o register -l ,shape -k SDO_GEOMETRY -c mkt_id -i sde8ora8i -u test -p test