0 Premise: Try to keep the geographic coordinate system of raster data and vector data consistent, if not, use
Data Management Tools–Projections and Transformations–Project for coordinate system conversion
1 specific process
My data includes a raster data and shp data of Chinese administrative regions
在 Data Management Tools–Raster–Raster Pcocessing–Clip
Notice:
- Selection of the latitude and longitude range of Rectangle
The clipping results are as follows: the range of the final result is the latitude and longitude range of the raster
The purpose of my clip is to turn the data outside the shp boundary in the grid into Nan, so as to facilitate subsequent drawing
2 batch cropping
Here, I am using ArcGIS's ModelBuilder
- Click on the following
- Insert an iterator
Select the file directory in the Workspace Catalog
Click Iterate Rasters, set the Raster Format to tif
Name No need to change here Right click
on Iterate Rasters
- Click Add to add the Clip tool.
Right-click Clip to set the parameters, and select all we need.
These two are optional boxes on the original tool (both selected)
Output Extent is the location of the shp file
- Input the Raster into the Clip, click the Clip tool, and set the corresponding parameters. After
setting the output file name of the Clip, in order to ensure the correspondence with the input data, it can be set to%Name%
(this Name corresponds to the previous Name)
- Verify and run the model
If there is no problem, run it! ! Finish! ! !
Learning link: