Possible Duplicate:
clipping a raster by multiple datasets or polygons

I have polygon layer and DEM and I want to write a program using python to cut the raster into multi-raster based on the polygon features.so please anybody can help??

actually I am using ArcGIS 10.1 full license

actually (clipping a raster by multiple datasets or polygons.) does not work for my case. I have wrote this code:............. import arcpy from arcpy import env from arcpy.sa import *

path name variables

polygonLayer = r'....' output = r'......' raster = r'.....'

name of ID field

fieldName = "OBJECKTID" cursor = arcpy.SearchCursor(polygonLayer) for poly in cursor: mask = poly.OBJECTID

create feature layer of current mask polygon

whereClause = '"' + focusField + '"=' + " ' " + mask + "'"
arcpy.MakeFeatureLayer_management(polygonLayer, 'currentMask', whereClause) 

but I got an error with whereClause......... so please any help how can I create feature layer fro each row...... so then I can use them to clip the raster..... thanks in advance

merged by whuber Feb 5 '13 at 13:09

This question was merged with Clipping raster by multiple datasets or polygons? because it is an exact duplicate of that question.