BUG

Unable to use sdelayer -o stats and sdelayer -o si_stats with ST_GEOMETRY layers

Last Published: April 25, 2020

Description

When using the sdelayer -o si_stats command, for example, C:\>sdelayer -o si_stats -l us_states,shape -u test -p test -i 5151, the following error message is displayed:

"Error: Underlying DBMS error (-51).
Error: Cannot get Map Layer Spatial Index Statistics for the layer
Underlying DBMS error"

When using the sdelayer -o stats command, for example, C:\>sdelayer -o stats -l us_states,shape -u test -p test -i 5151, the following error message is displayed:

"Error: Underlying DBMS error (-51).
Error: Cannot get Map Layer Statistics.
ORA-00942: table or view does not exist"

Cause

Using sdelayer -o stats and sdelayer -o si_stats commands does not work with ST_GEOMETRY layers.

Workaround

Use the following workaround to avoid receiving either of the above error messages.

  1. Setting the spatial index size to three times the size of the average edge of the feature envelope in the layer being indexed is a good practice for many data sets. The SQL query example below suggests a spatial index grid size to start with.
    Code:
    SQL> select (avg(((a.shape.maxx - a.shape.minx) + (a.shape.maxy - a.shape.miny)) / 2)) * 3 suggested_size from us_states a;

    SUGGESTED_SIZE
    --------------
    5878504.93

  2. The SQL query example below returns results that are similar to the results that the 'sdelayer -o si_stats' command would return for a given layer.
    Code:
    SQL> select count(*) total_shapes ,
    2 (round (a.shape.maxx/5878505) -
    3 round (a.shape.minx/5878505) + 1) *
    4 (round (a.shape.maxy/5878505) -
    5 round (a.shape.miny/5878505) + 1) num_cells
    6 from us_states a
    7 group by (round (a.shape.maxx/5878505) -
    8 round (a.shape.minx/5878505) + 1) *
    9 (round (a.shape.maxy/5878505) -
    10 round (a.shape.miny/5878505) + 1)
    11 order by num_cells;

    TOTAL_SHAPES NUM_CELLS
    ------------ ----------
    3 1

    For more information, see the link in Related Information.

Article ID:000009679

Software:
  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic