AnsweredAssumed Answered

Arcpy 10.1 ListFeatureClasses returns Raster Datasets

Question asked by bhillam on Jan 16, 2014
Latest reply on Jan 30, 2014 by bhillam
I am trying to loop through all the feature classes in an SDE geodatabase and get their name and feature count.  When I attempt to get the feature count of each feature class I run into an error because in my list there are raster datasets.  Why are there raster datasets in my resulting list from arcpy.ListFeatureClasses()? I pasted the code but it doesn't make sense to me why raster datasets are included in ListFeatureClasses?  What am I missing?

import arcpy from arcpy import env  env.workspace = r'Database Connections\MySDEgeodatabase.sde'  fcList = arcpy.ListFeatureClasses()


I looped through fcList using this code

for fc in fcList:     desc = arcpy.Describe(f)     print '{0}  {1}'.format(desc.name, desc.dataType)


This is where I realized the list contained raster datasets with dataTypes of "RasterDataset"? I want to avoid having to use arcpy.Describe() to filter to to get feature classes because there are hundreds of feature classes in the SDE geodatabase and it slows it down a ton.

Outcomes