ArcGIS batch cropping-create model
ArcGIS supports batch operations, which can be implemented using ModelBuilder and Python scripts.
- ModelBuilder is a visualization tool in ArcGIS that can connect multiple GIS tools together to achieve batch processing operations. Users can use ModelBuilder to build models to implement batch operations.
- Python scripts can also be used to implement batch operations. Users can use the ArcPy module to write Python scripts to implement batch processing operations.
1 Prepare data (one vector clips multiple rasters)
I have many years of national LUCC data and want to cut it to a specific watershed, as follows:
Convert .adf format LUCC data into tif data. The processing steps are as follows:
Generate a file in .tif format. Click ArcToolbox, click "Convert to Raster">>"Convert Raster to other formats (batch)">①②③, and finally "OK" to get the file in tif format
1.1 File database
- File geodatabase is data in the format of gdb
- A personal geodatabase is data in the format of mdb
2 Create model
Because the model is created under the Toolbox, we should first create a new toolbox. Select the folder, right-click, select "New" -> "Toolbox" in the pop-up panel, name it Batch Clip (BatchClip) to select the Batch Cropping
Toolbox, right-click, select "New" -> " Model". In this way, the model is created successfully. All that remains is the setting of parameters.
3 Specific parameter settings
1. Set up the iterator
2. Add cropping toolbox
Data Management Tools–Raster–Raster Pcocessing–Clip
The final result of the model is as follows:
3. Verification and operation
The result is as follows: