I am trying to write my first python code to use in ArcGIS 10.1.
I have feature classes in a file geodatabase .gdb, and AOI.shp (area of interest). I list my geodatabase feature classes, and want to intersect my list with AOI.shp. I want to save my final intersected files.
Here is my code:
# import system modules import arcpy, os from arcpy import env # Allow to overwrite existing files arcpy.env.overwriteOutput = True # Set environment settings env.workspace = r"C:\Users\...\extent_AOI\disturbaces_for_aoi.gdb" # identify AOI aoi = r"C:\Users\...\aoi.gdb\aoi" # Set output database out_wksp = r"C:\Users\...\disturbances_by_aoi.gdb" # list features in the working folder database fcl = arcpy.ListFeatureClasses() # print files to check them print fcl for fc in fcl: arcpy.Intersect_analysis([fc, aoi], out_wksp + fc, "ALL", "", "INPUT") print "intersection ok"
My code seems to run through PythonWin.
However, I can't find my output data in my output folder
How can I save my output data correctly?