AnsweredAssumed Answered

postpone creating spatial index?

Question asked by bruce.simonson on Oct 9, 2013
Latest reply on Oct 10, 2013 by bruce.simonson
Hi Gang,

I am using python to create and populate a feature class in a file geodatabase.  There are many shapefiles involved (ca 500).  These are appended to the target output feature class inside a for loop, as such:

for shp in shpList:     arcpy.Append_management( shp, outputfc )


This works fine.

However, I think that the Append_management function regenerates the spatial index for the outputfc, after each call (within the loop).  If I'm right, this takes about 12 minutes per shapefile in my case, and this amounts to 100 hours of processing time to generate this spatial index, over and over again.

Is there any way to postpone the generation of the spatial index, until after all of the shapefiles have been loaded?  Certainly after they are loaded, I can call:

arcpy.AddSpatialIndex_management( outputfc )


and save my poor CPU from regenerating the spatial index so many times.

Fingers crossed ...

Cheers,
-Bruce

Outcomes