try: import arcpy, os arcpy.env.workspace = "G:/PhD/ERA 40/WorkPython/join" targetFeatures = "G:/PhD/ERA 40/WorkPython/target/Alaska_20111229_geog_glaciers.shp" outDirectory = "G:/PhD/ERA 40/WorkPython/Output" #take all shapefiles from .../join folder which name contains "small" at the end fcList = arcpy.ListFeatureClasses("*small") #for each "small" feature class perform spatial join for featureClass in fcList: outFeatureClass = os.path.join(outDirectory, featureClass) arcpy.SpatialJoin_analysis(targetFeatures, featureClass, outFeatureClass) except: print arcpy.GetMessages()
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.