how to recalculate spatial index

5078
5
07-31-2015 12:22 AM
FrankHochstrate
New Contributor

How can I recalculate the spatial index for a featureclass in SQL Server programatically?

I already use the interfaces IIndexEdit and IGeometryDefEdit to recalculate the index by cloning the old index, following the example "RebuildSpatialIndex" in the developer help.

But I have to recalculate the extent because of performance issues. I can do it in ArcCatalog (Button "Neu berechnen" in the picture above), but how to reach the functionality programatically?

Thanks for any hint!

Frank

0 Kudos
5 Replies
ShaunConway
Occasional Contributor II

Grüß Dich,

Have you looked into a Python option? This link explains an approach using ArcPy to do what you are looking for.

*** EDITED WITH CORRECT LINK ***

ArcGIS Help 10.2 - Rebuild Indexes (Data Management)

*** EDITED WITH CORRECT LINK ***

Viel Glück,

Shaun

FrankHochstrate1
New Contributor

Shaun-

thanks for the hint, but I couldn't find ArcPy functions, that will do the desired work.

I suppose, the task is "too specific", it depends on the given DBMS.

I still hope, someone has an idea...

-Frank

0 Kudos
ShaunConway
Occasional Contributor II

Sorry for the bad link. Here is the correct link. Or you can search on Rebuild Indexes under Data Management.

ArcGIS Help 10.2 - Rebuild Indexes (Data Management)

Shaun

0 Kudos
AsrujitSengupta
Regular Contributor III

Are you trying to Recalculate the Spatial Index or the Extent of that feature class?

0 Kudos
FrankHochstrate1
New Contributor

I try to recalculate both. First I rebuild the spatial index but after that the feature class extend is equal to the extent of the feature dataset.

After creating the spatial index I have to recalculate the extent of the feature class (Button "Neu berechnen").

0 Kudos