Question

How does one get a total count of each feature subtype in a gdb?

  • 23 February 2021
  • 2 replies
  • 2 views

Badge +1

 Ideally I can read in the whole gdb and export to a csv that simply states the feature subtype and its total count of features. I know that exposing the "geodb_subtype_name" needs to happen to get those values. Can I avoid importing all of these and simply go from my single gdb reader, to the transformers that will give me the totals of each subtype? Below shows all the features that will then have subtypes within each one. I need to know the total of each subtype.FME_Sub_Count


2 replies

Badge +2

@sjolster31​ After you've exposed the "geodb_subtype_name", I think the StatisticsCalculator should give you the results you want. In the Group By use fme_feature_type & Geodb_subtype_name. This won't give you counts for subtypes that are not used in your data.

If you need to find the unused subtypes then you'll have to export a table of subtypes and then join those to your data. The article Geodatabase XML Workspace Document Schema Reader illustrates how to get a table of subtypes & domains you can use

Badge +1

@Mark Stoakes​ Thank you! So I went with "Group By: geodb_subtype_name" and then "Attributes to Analyze: "geodb_subtype_name". From there used the summary to a spreadsheet writer with just the "geodb_subtype_name" and "count" for the fields.

Reply