[gdal-dev] From HDF to Tiff format, and reproject from sinusoidal to WGS84 for MODIS LST and ET data

Joaquim Luis jluis at ualg.pt
Wed May 25 16:25:37 PDT 2016


I don't know if this is related to an issue that I posted here some weeks  
ago where the HDF's array metadata is not read by the HDF5 driver (but  
this files are not HDF5) but the thing is that I can read it with the GMT  
developing version (maybe it works too with official releases version too  
but can't test it).

grdinfo  
MOD16A2.A2000193.h31v11.105.2013122033833.hdf=gd?HDF4_EOS:EOS_GRID:"MOD16A2.A2000193.h31v11.105.2013122033833.hdf":MOD_Grid_MOD16A2:ET_1km
HDF4_EOS:EOS_GRID:MOD16A2.A2000193.h31v11.105.2013122033833.hdf:MOD_Grid_MOD16A2:ET_1km:  
Title: Grid imported via GDAL
HDF4_EOS:EOS_GRID:MOD16A2.A2000193.h31v11.105.2013122033833.hdf:MOD_Grid_MOD16A2:ET_1km:  
Command:
HDF4_EOS:EOS_GRID:MOD16A2.A2000193.h31v11.105.2013122033833.hdf:MOD_Grid_MOD16A2:ET_1km:  
Remark:
HDF4_EOS:EOS_GRID:MOD16A2.A2000193.h31v11.105.2013122033833.hdf:MOD_Grid_MOD16A2:ET_1km:  
Gridline node registration used [Cartesian grid]
HDF4_EOS:EOS_GRID:MOD16A2.A2000193.h31v11.105.2013122033833.hdf:MOD_Grid_MOD16A2:ET_1km:  
Grid file format: gd = Import/export through GDAL
HDF4_EOS:EOS_GRID:MOD16A2.A2000193.h31v11.105.2013122033833.hdf:MOD_Grid_MOD16A2:ET_1km:  
x_min: 14455820.0684 x_max: 15566843.9626 x_inc: 926.625433055 name: x nx:  
1200
HDF4_EOS:EOS_GRID:MOD16A2.A2000193.h31v11.105.2013122033833.hdf:MOD_Grid_MOD16A2:ET_1km:  
y_min: -3335388.24628 y_max: -2224364.35205 y_inc: 926.625433056 name: y  
ny: 1200
HDF4_EOS:EOS_GRID:MOD16A2.A2000193.h31v11.105.2013122033833.hdf:MOD_Grid_MOD16A2:ET_1km:  
z_min: 0.2 z_max: 3276.6 name: z
HDF4_EOS:EOS_GRID:MOD16A2.A2000193.h31v11.105.2013122033833.hdf:MOD_Grid_MOD16A2:ET_1km:  
scale_factor: 0.1 add_offset: 0 packed z-range: [2,32766]
+proj=sinu +lon_0=0 +x_0=0 +y_0=0 +a=6371007.181 +b=6371007.181 +units=m  
+no_defs

And for example extracting the first array.

grdconvert  
MOD16A2.A2000193.h31v11.105.2013122033833.hdf=gd?HDF4_EOS:EOS_GRID:"MOD16A2.A2000193.h31v11.105.2013122033833.hdf":MOD_Grid_MOD16A2:ET_1km  
lixo.grd



PS. Even, I did try to add the methods to the HDF5 driver but stumped on  
how to get the info out of the HDF5 file (damn complicated API) so fall  
back in GMT to fetch them from the text strings of all metadata. In lack  
of better, perhaps the same can be in the GDAL HDF5 driver.

Joaquim


> Hi,
>
> I'm fairly new to GIS and could use some help converting MODIS LST and  
> ET data to TIFF format in WGS84 projection.
> Example files can be obtained here:
> http://e4ftl01.cr.usgs.gov/MOLT/MOD11A1.005/2004.03.31/
> ftp://ftp.ntsg.umt.edu/pub/MODIS/NTSG_Products/MOD16/MOD16A2.105_MERRAGMAO/Y2000/D193/
>
> I'm haven't been able to figure out how to correctly specify the  
> parameters in the gdalwarp step.
> I've posted a GIS-Stack Exchange question here, but haven't gotten any  
> replies yet.
>
> Thanks a lot.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20160526/480de77d/attachment.html>


More information about the gdal-dev mailing list