MRT (MODIS Reprojection Tool) batch reprojection format conversion

Continued yesterday after finishing a bunch of data

Seeing the amount of 100+ data, I thought it would be too sand carving if I had to manually re-project and convert the format, so I started to find how to do batch processing.
First create a new folder, named DATA, and put all the MODIS to be processed. Put the HDF file in this folder;
then find the code, the code on the Internet is as follows

1 set MRT_DATA_DIR=f:\MOD13Q1_REPROJECTION
2 
3 for %%i in (*.hdf) do resample.exe -p test.prm -i %%i -o %%iout.tif
4 
5 pause

It is still very simple, create a new notepad, copy and paste, follow the steps to change the code, and save it as a bat file . The following is the quoted part

Here is the reference: In the first line of code, replace MRTDATADIR with your own MRTDATADIR name. The MRTDATADIR name can be found in the installation directory, find ModisTool.bat, and then right-click to select and edit;
here is the reference: in the second line of code, Replace test.prm with your own projection parameter file. If something goes wrong, you can replace resample with its full path, such as D: \ software_install \ MRT \ bin \ resample.exe;
here is the reference: the third line of code is After the operation is completed, keep the bat running window. If an error occurs, you can refer to the prompt of the bat window and copy the datum.txt and spheroid.txt files in the installation directory to the DATA folder;


change
It ’s easy to attach a picture that I ’ve changed, right?

The next step is to save a prm file

Open our MRT, adjust according to your file type and save a .prm, as shown in the figure
prm

Then we can batch process

I thought it was very simple. I double-clicked on modis.bat. Unfortunately, it did not start running. After several explorations, I almost dragged the bat file into my folder silently . Double-clicked. A miracle happened! ! !
run
Successful operation! So there is another key is to put the bat file and the file to be processed in the same folder.

Achievement display

over
So I was very excited to write another diary hhhhh, when I was blogging, it was running
and then saw a tearful line of words
yeah
.

Published 3 original articles · Liked5 · Visits 1203

Guess you like

Origin blog.csdn.net/weixin_43010839/article/details/102660141