Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've come across a few similar questions for older versions of ArcGIS, but haven't found a suitable answer for ArcGIS 10.

I have two polygon shapefiles that cover a large area (e.g. an entire State/Province). The first shapefile represents land cover for the entire State and the second represents 50 individual watersheds. I would like to clip the land cover shapefile based on each watershed (each has a unique name stored in a field). I would then like to save the output clipped files (one for each of the 50 watersheds) using the watershed name.

Given that there are 50 clips to be performed this process is a great candidate for batch processing.

share|improve this question
What have you found for older versions of ArcGIS, and what makes them unsuitable for use with ArcGIS 10? – nmpeterson Feb 7 '12 at 18:30
@Radar Take a look at this question: It covers what you are looking for. If you need any help modifying for your needs, let me know. I've flagged this as a possible duplicate. – SaultDon Feb 7 '12 at 18:41
@SaultDon: Are you saying that the solution(s) at will definitely also work in ArcGIS 10? – whuber Feb 7 '12 at 19:03
@SaultDon - Some changes have been made to cursors in ArcGIS 10 that cause that particular answer to be outdated. I'm hoping to find the best solution for Arc10 and not just a hacked version of a 9.3 script. – Radar Feb 7 '12 at 19:06
@whuber Not as it is, needs changes that may not be obvious. Radar - You're right, they're simpler =) – SaultDon Feb 7 '12 at 19:55
up vote 13 down vote accepted

The following script clips polygon watersheds to polygon county boundaries, naming each output featureclass something like HspWBD_HU12_county name. Tested and it works. Make sure your values in the NAME field have no special characters or spaces (simple Python string methods can clean that up for you).

import arcpy

arcpy.env.workspace = r'D:\Projects\GDBs\slowbutter.gdb\IPAS'
rows = arcpy.SearchCursor('HspAOI')
for row in rows:
    feat = row.Shape
    arcpy.Clip_analysis('HspWBD_HU12', feat, 'HspWBD_HU12_' + str(row.getValue('NAME')), '')
share|improve this answer
Perfect. Ran a quick test and it works just fine. Thanks @Chad! – Radar Feb 7 '12 at 19:28
Absolutely perfect though classic type cursor!! – SIslam Jun 1 '15 at 11:48

As you use ArcGIS 10, i would use modelbuilder with builtin tool: Iteration Feature Selection to perform this task. See the pseudo-model in the picture. it does not need to know python scritping at all. pseudo model

share|improve this answer
For a deeper explanation of this approach see Easily clip an entire workspace for a specific study area, and associated Clip Workspace geoprocessing tool package. Also explored here on stack:… – matt wilkie Jan 29 '15 at 19:49

This sounds exactly like what the Split tool from the Analysis toolbox does.

However, it requires an ArcInfo license to run so is not available to the majority of ArcGIS Desktop users so I like Chad's answer which will work for ArcGIS 10 Desktop users with ArcView and ArcEditor level licenses too.

share|improve this answer

You can do this the way you want if you run another tool in batch mode first: Conversion Tools > To Geodatabase > Feature Class to Feature Class. That will let you use an expression to take your watershed layer and pull out each watershed invidividually and save it as its own feature class, then you'll have 50 individual layers you can use with the Clip tool in batch mode.

share|improve this answer
I appreciate the answer, but this doesn't seem to be a very efficient solution. I'd rather not create 50 separate watershed files and then 50 more clipped files. – Radar Feb 7 '12 at 19:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.