[GIS] Creating functional spatial index of ST_Geometry Feature Class in ArcSDE for Oracle

enterprise-geodatabaseoracle-dbmsspatial-index

Copied an SDE feature class (with blob(sdebinary(?) geom) into the same SDE GDB (Oracle 11g/SDE 9.3.1) but with the ST_geometry configuration keyword. I can see that the feature class was created, all the fields come across fine, I can query it with st_geom functions etc., BUT in ArcMap, ArcCatalog, the features don't draw. (*note that when selected I can see the outline of the shape just fine) When I remove the spatial index the features draw, add the spatial index back, poof no draw. It would seem that ArcGIS cannot create a functional spatial index of my ST_Geometry features.

Best Answer

I guess I should have read the documentation here:
http://webhelp.esri.com/arcgisserver/9.3/java/index.htm#geodatabases/creating-95168347.htm

The solution was an Oracle 'create index' query a la:

create index sa_idx on st_parks(shape)
indextype is sde.st_spatial_index 
parameters('st_grids=1000 st_srid=5');

Ran into a 'maximum number of grids per feature' exceeded error, and then realized that the grid size is a function of the measurement unit of the spatial reference. So by originally passing in st_grids=1 (like the documentation) it was creating a 1 foot spatial index grid...and yeeeah...that was a little excessive.

Hopefully Esri will fix their create spatial index tool to accommodate Oracle.