Friday, 16 December 2016

qgis - MODIS MOD11A1 Reproject Change Data Value


I'm import and reprojected MOD11A1 with GDAL 1.10....my shell script is easy..


for file in *.hdf; do
echo "map: $file"

gdal_translate -of Gtiff -ot Int16 HDF4_EOS:EOS_GRID:"$file":MODIS_Grid_Daily_1km_LST:LST_Day_1km -a_nodata -9999 out/${file}.tif

echo "out/"${file}".tif" | awk 'BEGIN{FS=".";}{ print "mv "$0" "$1"."$2"."$3"."$4"."$5"."$7}' |sh`

but when running script reprojected something is wrong with data...


for file in *.tif; do
echo "map: $file"


gdalwarp -s_srs "+proj=sinu +lon_0=0 +x_0=0 +y_0=0 +a=6371007.181 +b=6371007.181 +units=m +no_defs" -t_srs EPSG:32719 \
-te 333524.4980000000214204 6618581.1791345691308379 422017.2268572300090455 6679275.1449999995529652 -tr 926.625 -926.625 \
-dstnodata -9999 -ot Int16 $file utm/${file}


done

look my screenshot on qgis....sript 1 import hdf


script 2 reprojected tif


any idea how to solve?



Answer



Ok My Solution .... write next scrip for scaling data Land Surface Temperature MOD11A1.....


for file in *.tif; do
echo "map: $file"

gdal_calc.py -A $file --outfile=sc/$file --calc=A*0.02

done

Nice!!!!!!! Linux is wonderful specially if you want more 5500 images...


Thanks a Lot AndreJ... for you comments


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...