Spatial Grid Index Properties

2061
5
05-03-2011 09:16 AM
RicardoRuiz
New Contributor
Added a number of SDE layers using the sdelayer command for Oracle 10g tables using an ST_GEOMETRY column. As part of sdelayer command, we requested the creation of the spatial index. When I look at the layer properties in ArcCatalog, it says: "This feature class has a spatial index that will be built later.". Does anyone know what this mean?  Where can I find information about this message? It has been a few days and the message is still the same.  We are using ArcSDE 10 SP1.
Reply
0 Kudos
5 Replies
VinceAngelo
Esri Esteemed Contributor
What command did you use to create the layer?  One of the grid options (the default used by Desktop)
is to compute the gridsize during loading, then apply it later (SE_SPATIALINDEX_AUTOMATIC), but
failure during load could leave that option present with no follow-on step to change the gridsize.

At this point you'd be better off defining a grid size or using ArcCatalog to rebuild the index.

- V
Reply
0 Kudos
RicardoRuiz
New Contributor
Thank you for your prompt reply.  This is the command we are using:

sdelayer -o register -l tab10gdb.county_90,stgeometry -e na+ -C OBJECTID -R 2 -t st_geometry -u tab10gdb -p ***@devgeodb -i sde:oracle10g

Looking at the table metadata, the index is there. But for some reason, ArcCatalog AND sdelayer -o si_stats don't see it.  sdelayer -o si_stats returns the following:

ArcSDE 10.0  for Oracle10g Build 775 Fri Sep 17 11:45:27  2010
Layer    Administration Utility
-----------------------------------------------------
Error: The operation requested is unsupported (-210).
Error: Cannot get Map Layer Spatial Index Statistics for the layer

How do we tell ArcCatalog and sdelayer that the index was created?  Some of the layers are quite large and we would prefer not to recreate the spatial indexes.

Thanks.
Reply
0 Kudos
VinceAngelo
Esri Esteemed Contributor
'sdelayer -o si_stats' does statistics on the Sn table, which doesn't exist with ST_GEOMETRY storage.

What does 'sdelayer -o describe_long' report?

What command did you issue to create the index that can't be found?

- V
Reply
0 Kudos
RicardoRuiz
New Contributor
Our understanding is the there was a bug in 9.3 but it works on ArcSDE 10.  This is the information from our original geodatabase which runs on ArcSDE 9.3:
/home/ruiz0001 $ sdelayer -o si_stats -l county_90,STGEOMETRY -i sde:oracle10g -u tab10gdb -p ***@geodb

ArcSDE 10.0  for Oracle10g Build 775 Fri Sep 17 11:45:27  2010
Layer    Administration Utility
-----------------------------------------------------
Layer 865 Spatial Index Statistics:
Level 1,   Grid Size 19988620.9771923
|-------------------------------------------------------------------|
| Grid Records: 3227                                                |
| Feature Records: 3221                                             |
| Grids/Feature Ratio:  1.00                                        |
| Avg. Features per Grid: 806.75                                     |
| Max. Features per Grid: 3220                                      |
| % of Features Wholly Inside 1 Grid: 99.84                         |
|-------------------------------------------------------------------|
|               Spatial Index Record Count By Group                 |
| Grids:      <=4    >4    >10    >25    >50    >100   >250   >500  |
|---------- ------ ------ ------ ------ ------ ------ ------ ------ |
| Features:   3221      0      0      0      0      0      0      0 |
| % Total:     100%     0%     0%     0%     0%     0%     0%     0%|
|-------------------------------------------------------------------|

We used Oracle Data Pump Export/Import to copy the data from the database containing ArcSDE 9.3 to the new database that has ArcSDE 10. During Import, we excluded the spatial index because we had to modify the SRID value in our geometries. After the SRID was modified, we registered the tables as SDE Layers.  According to the documentation, the sdelayer command creates the spatial index as part of the registration.  This seems to be the case according to the metadata but the sdelayer -o si_stats command and ArcCatalog don't see the index.

Here is the information from describe_long:

/home/ruiz0001 $ sdelayer -o describe_long -l county_90,STGEOMETRY -i sde:oracle10g -u tab10gdb -p ***@devgeodb


ArcSDE 10.0  for Oracle10g Build 775 Fri Sep 17 11:45:27  2010
Layer    Administration Utility
-----------------------------------------------------
Layer Description ....: <None>
Table Owner ..........: TAB10GDB
Table Name ...........: COUNTY_90
Spatial Column .......: STGEOMETRY
Layer Id .............: 645
SRID .................: 2
Auth SRID.............: 2
Minimum Shape Id .....: 1
Offset ...............:
  falsex:  -20037700.000000
  falsey:  -30241100.000000
System Units .........:      10000.000000
Z Offset..............:          0.000000
Z Units ..............:          1.000000
Measure Offset .......: <None>
Measure Units ........: <None>
XY Cluster Tolerance .:          0.001
Spatial Index ........:
  parameter:    SPIDX_AUTOMATIC
  exist:        Yes
  array form:   0,0,0
Layer Envelope .......:
  minx: -19951913.22780,        miny:   2017836.35740
  maxx:  20021888.10320,        maxy:  11554793.57120
Entities .............: na+
Layer Type ...........: Extended SQL Type/ST_GEOMETRY
Creation Date ........: Tue May  3 14:36:24 2011
I/O Mode .............: NORMAL
Autolocking ..........: Enabled
Precision.............: High
User Privileges ......: SELECT, UPDATE, INSERT, DELETE
Coordinate System ....: PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984"
,6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAME
TER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],PARA
METER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]

Layer Configuration ..: DEFAULTS

I noticed that on the ArcSDE 9.3 geodatabase (geodb), the Spatial Index information reads:
Spatial Index ........:
  parameter:    SPIDX_GRID,GRID0=19988620.9771923,FULL
  exist:        Yes
  array form:   19988620.9771923,0,0

I hope you can solve this mystery.
Reply
0 Kudos
VinceAngelo
Esri Esteemed Contributor
It looks like your indirect layer creation process has corrupted the layer metadata.  I suspect
the register command didn't create an index because the metadata indicated one was present.

I'd recommend you go through the exercise of defining an appropriate grid size, since your
previous spatial index had all but one of the features in a single grid tile.   This will also
correct the "yes, you have no index" situation.

- V
Reply
0 Kudos