[R-sig-Geo] Antw: Extracting weird temperature and EVI values from MODIS data
Matteo Mattiuzzi
matteo.mattiuzzi at boku.ac.at
Mon Sep 24 11:44:11 CEST 2012
Dear David,
lets say you are getting the EVI from MOD13Q1 product:
https://lpdaac.usgs.gov/products/modis_products_table/mod13q1
scroll down and click on layers.
Here you find every infromation about scaling and in case of EVI it is :
layer Name: 250m 16 days EVI
Units: EVI
bit type: 16-bit signed integer
Fill value (NA): -3000
valid range: -2000 to 10000
scaling factor: 0.0001
so you have to multiply each EVI value by 0.0001 (or divide by 10000).
for the LST product (ie Mod11a2) see:
https://lpdaac.usgs.gov/products/modis_products_table/mod11a2
the scaling factor is 0.02
...
Now a little advertisement for my MODIS package may give it a try for the steps you have described.
setRepositories() # add omegahat and r-forge
install.packages("MODIS")
MODIS:::checkDeps() # and do what it is suggesting you the enable all the functionalities
# on the first load the package is asking you to read the configuration file. I think settings are quite fine and you can just use the file.copy(.....) command it is printing out.
# here you can print the package settings ("outPath" for example, where you find your data after processing)
MODIS:::.getDef()
# now you should be able to work with it, but since you probably already have downloaded data use the orgStruc() command to fetch MODIS gird data on you computer and store it in a dedicated and managed location.
# please read carefully the help of this function!!!
orgStruc(source="root/folder/of/you/modishdffiles")
# now you download and process the data with:
# you are using LINUX (or MAC is probably the same) than use the function runGdal() since it is better implemented and you have more control on the output!
runGdal( product="M.D13Q1", job="myEVIgdal", SDSstring="01", begin="2011001", end="2011-02-28") # in this case you can select the area interactively.
runGdal (product="M.D13Q1", job="myEVIgdla", SDSstring="01", begin="2011001", end="2011-02-28", extent="austria") # in this case you downlad the country of Austria.
runGdal( product="M.D13Q1", job="myEVIgdal", SDSstring="01", begin="2011001", end="2011-02-28", extent="any/raster/file.gdalsupported") # and in this case you will get the extent, pixelsize, projection of you raster file.
# see ?runGdal for all options
# if you are using Windows, you have to use MRT since the use of GDAL (FWTools) is hanging on a very small but tricky problem.
runMrt( product="M.D13Q1", job="myEVImrt", SDSstring="01", begin="2011001", end="2011-02-28") # in this case you can select the area interactively.
runMrt( product="M.D13Q1", job="myEVImrt", SDSstring="01", begin="2011001", end="2011-02-28", extent="austria") # in this case you downlad the country of Austria.
runMrt( product="M.D13Q1", job="myEVImrt", SDSstring="01", begin="2011001", end="2011-02-28", extent="austria", outProj="UTM") # in this case you downlad the country of Austria and ptoject to UTM (zone can be set but MRT detects is automaticly).
The same thing you can do with any other MODIS Land Grid files, run:
getProduct()
# or
getProduct("M.D13") # using regEx
Matteo
>>> dlarsen 21.09.12 23.51 Uhr >>>
Hi all,
I am trying to generate temperature and EVI for points in my dataset, but
the values I am extracting are strange. The EVI values range from 627 -
9149 with a mean of 4912.861. The EVI values range from 14933 to 15800 with
a mean of 15549.66. Is there some type of conversion that I am missing?
Here are the steps I took. (I know many of them are inefficient, but I am
doing this for my dissertation without a lot of support).
1. Download HDF files using Earth Explorer
2. Use MODIS Reprojection tool to convert to vegetation indices and
temperature tif files.
3. Use the raster package in R to extract the values of the tif file to
spatial points.
Any help would be appreciated.
Thank you,
David
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Extracting-weird-temperature-and-EVI-values-from-MODIS-data-tp7581006.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
More information about the R-sig-Geo
mailing list