1
import arcpy

arcpy.env.workspace = "C:\\ArcGIS\\Data"

FCList = arcpy.ListFeatureClasses("")

for feature in FCList:

    print feature

This yields me a list of all of my .shp files, but I need it to recognize what geometry shape those shapefiles are and print them on the same line separated by a comma

1 Answer 1

3

You could use describe and then get the properties from the feature class

Also if this help ListFeatureClasses also allows for a "feature_type" so if you really only want certain types you could provide a value for this parameter (more info).

import arcpy
arcpy.env.workspace = r"C:\ArcGIS\Data"
fcList = arcpy.ListFeatureClasses("")
for fc in fcList:
    desc = arcpy.Describe(fc)
     print(fc + ',' + desc.shapeType)

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.