Select to view content in your preferred language

SOLVED: Simple python code snipet to summarize basic contents/metrics of a geodatabase

558
0
07-05-2023 07:12 PM
NealBanerjee
Frequent Contributor

Hello,

I often find myself getting data in a geodatabase format, and usually first thing I want to do is just get a basic sense of contents.  Im sure others do/feel the same way.  If you are not familiar with it, the XRay addon for ArcCatalog has been/is great for listing feature classes, fields, domains, etc.  The one thing it doesnt provide is feature counts. 

I havent been able to find something lightweight and simple to get the feature count information as well, so just spent a few minutes and wrote a very low-tech python code snippet.  It will go through a geodatabase and print each feature class name, type, and number of records.  It will also total number of feature classes and total feature at end. 

Attached is a python code snippet (I saved just as .txt file) that you can  load (or copy/paste) to run within Arc Pro or ArcMap in command line.  Just make sure to change reference to GDB on line 5.  Below is exerpt of results that I ran in Pro

NealBanerjee_0-1688609499577.png

 

0 Kudos
0 Replies