MODIS Reprojection Tool

Download   MRT from here.  I just downloaded the zip file to my Desktop. You will have to create a REVERB account or ECHO account to get the tool.  Before you start the unzip of the MRT  you should take a few steps to prepare yourself.  I struggled a lot with this install because I was not  prepared, so lets take some time to prepare. This is not a simple unzip the file and click install.  The install I do here was for Windows 7, but the installer gives you these choices:

  Which version of Windows are you running?
  1. Windows XP or later
  2. Windows 2000
  3. Windows NT

Unless you are in fact running Win2000 or NT  then  #1 will be the choice you want to make.  If you are running  Windows2000 then the install is going to make a change  to autoexec.bat. If you are running NT, XP or anything later than XP ( Vista, 7  etc) Then there is no autoexec.bat  to change and the installer will be modifying other files to do the install.

Other things you should do as a preliminary. Decide where you want to install  MRT because the install will unzip files to this directory.  And most importantly write down your path to java.  So I would start by updating java from www.java.com. After you update java you need to copy down the path to java. You must do this exactly!  You need to find the path to java.exe.  On my system it is located here.

“c:\Program Files (x86)\Java\jre7\bin\java.exe”

Once you have that,  then you should unzip the file you downloaded. That download will contain the following files after unzipping: mrt_install.bat,  MRT_WIN.zip, unzip, and reg_set.  If you like open up the   *bat file in  notepad. If you double click on it it will just execute. I suggest reviewing the bat file before running it.

If you double click on it you will see the following screen

Then just follow the instructions. You will be asked to specify a directory to install the files. The MRT_WIN.zip file will be unzipped to that directory. You will also be asked for your java path.

After you finish the install you can also create a shortcut for your desktop. Look in the “bin” folder of MRT. You will find a file named modis_tool.bat. Right click and create a shortcut. The bin directory also has an icon for the shortcut. After creating a shortcut for this file, you can copy it to your desktop.

Click on the shortcut and you will see the following. If you dont create a shortcut, just start the program by doubling clicking on Modis_Tool.bat  in the “bin” directory.

Here is the main screen

Click on Open Input File and select the HDF file that you downloaded previously

After loading the file  we will reproject it to  A Geotif  using geographic projection.

Note I have   ALL the selected bands in this step. Each band will be resampled and reprojected.  I selected an output file name. Resampling I have selected nearest neighbor. Note the QC files are all bit data, so nearest neighbor is the right choice. I’ve selected a geographic pr0jection and I edited the parameters (Edit Projection Parameters ) to give the output WGS84 datum.  If you click run the input file will be unpacked into the various bands and each band will be resampled, projected and saved as a geotif.

To show you what the Geotif looks like, I’ll pull it up in R.

library(raster)

library(rgdal)

day <- “test.LST_Day_1km.tif”

LST <- raster(day)

LST <- LST * .02

LST[LST==0]<-NA

Note that I scaled the values in the file by .02.  SCale factors are located in the documentation on the file. Then I set 0 to NA. After plotting we see this which is Land Surface Temperature in Kelvin

and then I can crop the data and look at a smaller area. The pixels here are roughly 1km ( 926 meters ) On the bottom we have LST during the day and on the top we have the  landcover classes from my other project. The red detail in the middle is a small city.

For the next step go here

  1. Revati
    May 28, 2013 at 1:40 PM

    Thank u for the MRT info.But i am facing problem in reprojecting the MOD09 A1 file.The process gets terminated.

  2. Hasan
    April 18, 2014 at 8:01 PM

    I m working in windows environment, XP. i have installed the tool but when input HDF files, it says “Error in module” opening input header file. i cant process from this point. kindly tell me the soln.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 36 other followers

%d bloggers like this: