ENVI irregular cropping (using SHP files) Read by 678 Comment (0) Favorites Report
Today, customers who want to achieve irregular cropping are always operating under ArcGIS. Today, they are very itchy and want to work on it under envi. After a long time, they have finally finished the work, now we will write down the steps for cropping the grid in ENVI for your reference:
Steps:
Open the irregular SHP surface data in the ENVI, convert it to the ENVI format, convert it to the ROI, and then perform cropping.
1. Open raster data: use file -- open image
2. Open Vector Data: use file -- open Vector
Or vector -- open vector, select the file type shapefile (*. SHP), and select the Vector file. Note that in the import vector files parameters dialog box that appears, select the correct projection type. After OK, ENVI automatically converts the Vector file to the EVF format. For example:
Note that the projection system of the raster data and the vector data must be consistent. If they are inconsistent, re-projection is required to make them consistent. For example, the coordinate system is WGS84.
3. Convert vector data into ROI: Select data in availabel vectors list and select export layers to ROI in file, select data file to associate with new ROIs, select the raster data to be dropped, and then select convert all records of an EVF layer to one ROI in export EVF layers to ROI, click OK. For example:
4. Crop raster data: Select subset data via ROIs in basic tools of the ENVI main menu, select the raster data to be cut in select input file to subset via ROI, and click OK. Then, the spatial subset via ROI Param... dialog box appears. In slect input ROIs, select the established ROI. Finally, select the output result to the file or the memory. For example:
**Do you need to pay attention to mask pixels outside of ROI? This option. If no is selected, the crop is based on the smallest rectangle range including the ROI, and the resulting data is also a rectangle. If yes is selected, the data value out of the ROI range must be given after the mask background value. The default value is 0 (this value is set at will ), the expected result is the irregular border cropping result.
**In addition, the vector data must be of the polygon type. If the line type is cropped, an error occurs when you want to crop the data according to the boundary.
Result comparison: