5

We receive many 10.3 file geodatabases (fGDB) from a vendor. One contractual requirement is that the fGDB be compacted. Understandably we quality assure everything that comes in our door. Currently I have to record the file size of the fGDB and then run a compact, and look at the file size again. I can think of several ways of doing this with arcpy modules. Is anyone aware of a way to test for compaction without compacting the fGDB?. A true false return in ArcPy return would be handy.

I've not found anything in the forums and I'm inclined to think I might have to lodge an ArcGIS Idea.

2
  • why look at the file size? if you're running a compact, then just take the result as compacted and distribute that as required
    – Midavalo
    Apr 6 '16 at 4:45
  • Copy it, compact and compare size using script
    – FelixIP
    Apr 6 '16 at 5:01
3

I can't find any ArcObjects interface that can ask the question has a GeoDatabase been compacted. There is an interface that can ask if a File GeoDatabase has been compressed and this is ICompressionInfo

Thinking about it once a GeoDatabase has been compacted, you can't "un-compact" it so from the first time it ever gets compacted then it is always compacted, even if you let it get large and compact it multiple times. So if ESRI did put a flag into the database that says it has been compacted you would not be able to trust it.

Compression is different, it's either compressed or not and you can swap between them whilst compaction is a permanent removal of redundant data.

The only way to know is do what @FelixIP suggests.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.