I would like to clip a DEM using a grid of polygons. It's probably easier to use multiple polygons in one shape file, but I haven't managed this so I'm trying to use a for loop so I can loop through each dataset in a gdb (each contains only one polygon).
Here's my code (doing it in the python window).
#creating a workspace and a list of feature classes arcpy.env.workspace = "C:/data/lidar/lidar.gdb" fcs = arcpy.ListFeatureClasses() #looping through each feature class and creating a raster based on the extent of #feature class for fc in fcs: arcpy.Clip_management("perth", "#", "C:/data/lidar", fc, "", "ClippingGeometry") My code doesn't execute however, it just sits there, waiting for something else... but what? I can get it to work for one clip, but not with the loop.
I'm sure I should be doing something else for the output, to name each new raster by feature class or something... but again, don't know how. Please let me know if I should add any more info.
أكثر...
Here's my code (doing it in the python window).
#creating a workspace and a list of feature classes arcpy.env.workspace = "C:/data/lidar/lidar.gdb" fcs = arcpy.ListFeatureClasses() #looping through each feature class and creating a raster based on the extent of #feature class for fc in fcs: arcpy.Clip_management("perth", "#", "C:/data/lidar", fc, "", "ClippingGeometry") My code doesn't execute however, it just sits there, waiting for something else... but what? I can get it to work for one clip, but not with the loop.
I'm sure I should be doing something else for the output, to name each new raster by feature class or something... but again, don't know how. Please let me know if I should add any more info.
أكثر...