Friday, 17 February 2017

Many-to-many clip in ArcGIS 10.2



I have two layers, each contain hundreds of polygons. I'm trying to find a way to clip the data from one layer to each polygon of the other layer. The problem is the clip features of the layer overlap. I would like the input layer to be clipped to each polygon separately and create duplicated in the overlapping areas. Is there an easy way of clipping the input layer to each polygon of the second layer separately? Unfortunately I'm not familiar with coding if that's an option.



Answer



Since you don't want a coding solution, I have a modelbuilder solution:



  1. Create a new model

  2. Add you input layer and your clipping layer

  3. Right click in the model and select iterators>feature selection

  4. Connect the clipping layer to the iterator and set the group by field if you need to group by a field

  5. Add the clip tool and connect the output of the iterator to the clip tool as the clipping features

  6. Connect the input layer to the clip tool as the input features


  7. Open the clip tool properties and change the output path to YourTextHere_%Value% - this will output YourTextHere_(attribute value of selected feature) e.g. Properties_131


In the picture below, you can see the model set up, clip settings and example outputs from the model: enter image description here


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...