I am trying to follow Error when using gdal_calc.py and Friend commented:
import os
gdal_calc = 'python C:/PROGRA~2/GDAL/gdal_calc.py -A d:/mnt_5x5.tif --outfile=d:/test.tif --calc="A+1"'
os.system(gdal_calc)
but I take error :
..<string>:1: RuntimeWarning: overflow encountered in multiply
C:/OSGeo4W64/bin/gdal_calc.py:296: RuntimeWarning: invalid value encountered in multiply
here complete message :
0 ..<string>:1: RuntimeWarning: overflow encountered in multiply
C:/OSGeo4W64/bin/gdal_calc.py:296: RuntimeWarning: invalid value encountered in multiply
myResult = ((1*(myNDVs==0))*myResult) + (myOutNDV*myNDVs)
10 .. 20 .. 30 .. 40 .. 50 .. 60 .. 70 .. 80 .. 90 .. 100 - Done
Any idea why I take this error?
I take new image for output but I am not sure if this image is correct after this error .
here my complete code :
gdal_calc = 'python C:/OSGeo4W64/bin/gdal_calc.py -A {0} -B {1} -C {2} --outfile=test.tif --calc="(5*A)+(5*B)+(2*C)"'.format(a,b,c)
os.system(gdal_calc)