AnsweredAssumed Answered

How do you use python to recalculate the Spatial Index of a feature class in SDE?

Question asked by longc_ChesterfieldVA on Sep 28, 2015
Latest reply on Sep 29, 2015 by GSCUser85

Hello,

 

We are looking for a way to script the "Recalculate" of a spatial Index button with python, but are having some problems finding a way that works... We first became aware of a problem when it was taking 25 + seconds to complete a identify of a feature. When we started investigating the problem we found that the extent of our bounding box was off (were located in Virginia). We have found that we can go into the properties of the feature class and click the Recalculate button and this fixes the problem but since that is a manual process it is not what were looking for. We have also found that by clicking the Recalculate button and then running the compress on the feature class, the parcels feature class's bounding box is broken again.

 

We have tried fixing this with python and with model builder and recommendations from this postBatch recalculate spatial index but nothing has worked yet. Below there is information about the model we created at the recommendation of the forum post and some information about the feature class we are trying to fix.

 

Any information on how to script the recalculate button would be great thanks!

 

Background information:

 

Feature class - Parcels that are being populated through a stored procedure in SQL

Number of records - 131,366

Arcmap version - 10.1

 

 

Outcomes