Wednesday 26 April 2017

gdal - Batch conversion of Modis Swath (level 2) data


I'm using very MODIS Swath products and need to import some bands to TIF. I'm working with MOD06_L2, MOD07_L2 and MOD11_L2 products and the MRT Swath isn't work as well. I'm using the following code:


gdalwarp -of GTIFF -tps -t_srs EPSG:4674 HDF4_EOS:EOS_SWATH:"MOD11_L2.A2014001.1305.006.2016179220648.hdf":MOD_Swath_LST:LST LST.tif


Unfortunately, the output image is blank. I need to convert 3 years of data for the products listed above.


Can anyone help me?



Answer



Are you sure that the image is blank? I used the same input image and the same code using GDAL 2.1.3 and OS X 10.12.6:


enter image description here


The resulting output opened in QGIS:


enter image description here


Check you GDAL version or compute histogram of the output .tif to be sure if the image has only blank or NULL pixels.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...