Raster Caculator Qgis 2.6 v/s Gdal_calc.py by Terminal

المشرف العام

Administrator
طاقم الإدارة
I'm a stupid problem for the time being!!! I need calculated monthly mean of Snowcover data by MODIS product, and then modify this script gdal_calc.py in this section

create alphabetic list for storing input layers

AlphaList=["A","B","C","D","E","F","G","H","I","J","K","L","M", "N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e"]

and wrote this script:

!/bin/bash

echo -n "./gdal_calc.py " > comandos_py.sh

array=(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e)

cont=0for file in MCD10A1_*.tif ; do echo "map: $file" letra=${array[$cont]} echo -n "-$letra ${file} " >> comandos_py.sh cont=$[cont+1]done

echo -n "--outfile=MEAN_2013_06.tif --calc=\"(A+B+C+D+E+F+G+H+I+J+K+M+N+O+P+Q+R+S+T+U+V+W+X+Y+Z+a+b+c+d)/30\" --NoDataValue=-9999 --type=Float32" >> comandos_py.sh

both running well..... but the output file is incorrect...

in another way!!!! load all file on QGIS 2.6, open RASTER CALCULATOR insert 30 image SNOWCOVER DAILY sum and divided by 30 and the output file IS CORRECT....

can someone explain to me why this happens??????

Thanks in Advanced!!



أكثر...
 
أعلى