1

I am trying to analyse some MODIS LST data (MOD11_L2) and am having some difficulty projecting the files into WGS84. I know that I can use the MODIS Reprojection Swath Tools, but I am trying to do the whole process using gdal (which I am currently running through python as this is where the rest of my process is).

In python, I have been using:

import subprocess
subprocess.call(some gdal functions)

I have tried the gdal_warp function but am having trouble with the parameters of the tool. Here is an example file: http://e4ftl01.cr.usgs.gov//MODIS_Dailies_F/MOLT/MOD11_L2.041/2015.08.15/MOD11_L2.A2015227.0215.041.2015228093331.hdf.

I have tried looking at the help here: How to reproject MODIS Swath data to WGS84 but it does not seem to work with the LST data which I am using.

I want this to work so I end up with a Geotiff file in WGS84.

I'm fairly new to both gdal and python!

  • Consider reading the answer to this question: gis.stackexchange.com/questions/81361/… It should give you a good starting point (and most likely the entire answer). – Mikkel Lydholm Rasmussen Oct 17 '16 at 12:20
  • Thank you for your reply. Unfortunately the answer provided via that link does not work with this data. I am not sure as to why. The file I have linked to, when running gdalinfo does not have any GCPs... may be one reason why but as I said, I'm unsure. I will update my gdal to see if that makes any difference, but it should be the latest. – tda Oct 17 '16 at 12:33
  • 2
    I unfortunately don't have much time to look at it, but the HDF4 to XYZ to TIFF process shouldn't be affected by the lack of valid GCP data. It's a bit more cumbersome, but it should be doable without too much messing about. You could also use MRT-Swath in much the same way as you are currently attempting to use GDAL, and MRT-swath very rarely has issues reading any MODIS file. – Mikkel Lydholm Rasmussen Oct 17 '16 at 12:45
  • Thank you for your help. I will try the XYZ method and see if I can get it to work. My issue with MRT-Swath is that the input parameter files require me to have separate geolocation files for each MODIS LST file... which is frustrating and makes the process very long (having to create different param files for all of my ~100 images). If I find the answer using XYZ, I will post up a full answer. – tda Oct 17 '16 at 13:07
  • You can reuse parameter files from MRTSwath. You can even skip the parameter file entirely and give it all the information through the command-line. – Mikkel Lydholm Rasmussen Oct 17 '16 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.