6

I work with a bunch of file geodatabases and some of them are compressed. I want to find out quickly which ones are and which aren't. The Compress File Geodatabase Data GP tool doesn't seem to have any check before running. I don't want to run File Geodatabase Data GP tool on uncompressed geodatabases though; I just to know whether they are compressed/uncompressed.

I could grab some random feature class / table and try starting editing session to see if it will let me do that (because you can't edit data that is compressed), but am looking for a more elegant solution. Ideally this would be an ArcPy/Python solution which I could use for going over multiple geodatabases.

4
  • Are you looking for an ArcPy, ArcObjects or manual solution? For ArcPy I think you may be looking at needing to submit an ArcGIS Idea. – PolyGeo Mar 25 '14 at 20:53
  • @PolyGeo, I was looking for any solution that would allow me to specify a list of file geodatabases and getting information if they are compressed (and which are not). ArcObjects is my last resort if nothing else would work :) – Alex Tereshenkov Mar 26 '14 at 6:34
  • W.r.t. compression, this actually occurs at the feature class and table level even though you can choose to compress everything in a file geodatabase i.e. within a file geodatabase you can have some feature classes and tables compressed while others are not so I think you should edit your Question to clarify that you are looking for (preferably) an ArcPy way to determine if a feature class or table is compressed. – PolyGeo Mar 26 '14 at 6:39
  • @PolyGeo, done! – Alex Tereshenkov Mar 26 '14 at 6:56
9

From what I know, there is no property to automatically identify compressed file geodatabase with arcgis. But you can see this information in ArcCatalog : A compressed feature class or table has "(compressed)" in the Type column.

For routine check, you can also look for the .cdf files inside your .gdb folder using file searching methods (e.g. os.walk() or glob.glob() in Python).

2
  • +1 for checking feature class properties window (works both within ArcCatalog and Catalog window in ArcMap) > General tab. But how have you figured out that compressed file geodatabases would have .cdf files? They do indeed and I now just ran a Python script to iterate over .gdb folders. – Alex Tereshenkov Mar 26 '14 at 6:55
  • 1
    I was expecting .lock files so I opened my .gdb in Explorer. But I've found the difference to be the .cdf for the .gdb I knew. Then I checked by compressing /uncompressing one of my gdb and it validated my hypotheses. – radouxju Mar 26 '14 at 7:43

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.