This question already has an answer here:
I am preparing some data using FME, which I end up writing to an Esri file geodatabase. Unfortunately, FME doesn't appear to update the written feature classes' spatial indices. This results in display problems when I later inspect the written data with ArcMap (or other ArcGIS desktop tools).
It appears that there are two seemingly easy solutions for this problem:
- Recreate any spatial indices after writing data.
- Compact the file geodatabase after writing data.
Compacting seems like the easier choice, because it can be done per geodatabase (vs. recreating indices per feature class).
I don't want to compact the geodatabase manually; ideally I'd want to compact the geodatabase inside my FME workbench, using a shutdown Python script. However, there appears to be no ArcGIS geoprocessing tool for compacting a geodatabase (only one for compressing, which is not the same thing).
Does anyone have a solution here?
- Updating the spatial indices directly in FME; or
- compacting a file geodatabase using ArcPy (in an FME shutdown script).