Select to view content in your preferred language

How to clip multiple shape files

7416
4
Jump to solution
01-28-2022 11:36 AM
RickCheney
Frequent Contributor

In the post at the link below about clipping it says: " It doesn't change the input data though, but actually outputs a new dataset with the portion of the input data that overlaps the clipping feature."

how-to-cut-a-rectangle-out-of-a-shape-file 

If I have a map with 5 shape files.  I create a rectangle that covers a portion of the map.  I clip all layers to the extent of the rectangle.  Now, only a portion of the source shape files is visible.  The original input shape files remain the same.  When I save the project, does it output a new set of shape files somewhere?  When I close and re-open the project the source of the shapefile layers is still the same original large files.  What I am trying to do is create new smaller shape files that match the extent of the rectangle.  The map I am working with is huge and I would like to create a new map that is a smaller portion of the original map.

0 Kudos
1 Solution

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

make a rectangle featureclass and use it for your clipping.

use arctoolbox tools

Clip (Analysis)—ArcGIS Pro | Documentation

shortcuts are fine, but provide less control

follow the example

batch_clip.png


... sort of retired...

View solution in original post

4 Replies
DanPatterson
MVP Esteemed Contributor

where did you save the clipped data?

If the input data from the clip comes from 5 different files, you have to clip 5 times, once for each file.  You can batch clip from the clip tool.

Once you have your clipped files, you can merge them together.

Also, remove the input files from the project if you don't need them...nothing will happen to them


... sort of retired...
RickCheney
Frequent Contributor

OK, thanks Dan.  I should have provided more information.  Let's say the 5 shape files are in c:\map\one.shp, two.shp, etc.   

I should have mentioned that I imported a map, clicked on the New Data Frame, right-clicked on the Default database, created a new Feature Layer called "mask", dragged the Mask feature onto the map, clicked Create, created the rectangle.

In the Contents pane on the left, I right-clicked on the top-most item, New Data Frame, selected Properties, selected Clip Layers, Clips to an Outline, selected the Mask, clicked Apply, clicked OK.

I saved the project in c:\newmap\

I don't see any shape files in c:\newmap\

0 Kudos
DanPatterson
MVP Esteemed Contributor

make a rectangle featureclass and use it for your clipping.

use arctoolbox tools

Clip (Analysis)—ArcGIS Pro | Documentation

shortcuts are fine, but provide less control

follow the example

batch_clip.png


... sort of retired...
RickCheney
Frequent Contributor

 

THANK YOU DAN!!!    Dan, thank you for your patience.  First, I didn't try going through the Toolboxes to get the proper tool.  Then I didn't realize that "Clip" had other options which were revealed by right-clicking.   The Batch Clip was exactly what I needed.  I ran it over and over and it would only clip one of the layers and then I remembered that when I first filled out the name for the Output Features, it was originally auto-filled with a sample name that had %Name% at the end of it and then I realized that %Name% was a variable that needed to be in there so it could add the name of each shape file. 

For example, one.shp, two.shp, three.shp  become  testBatch_one.shp, testBatch_two.shp,  testBatch_three.shp, 

After I fixed name it worked perfectly.

C:\Users\Rick\Documents\ArcGIS\Projects\batch\testBatch_%Name%.shp