Cannot Run Raster Calculation Using GDAL -
i having trouble running raster calculation through gdal. attempting convert raster db
through equation below.
a = raster file
"10*log10(power(a,2))-83"
using gdal_calc
looks following.
c:\>gdal_calc.py -a "c:\users\moses\desktop\calc_test\test444.img" --outfile="c:\users\moses\desktop\calc_test\test555.img" --calc="10*log10(power(a,2))-83" --debug --overwrite
i have attempted in separate pieces. so, raise raster second power, log10 of result. each time recieve following error...
:1: runtimewarning: divide 0 encountered in log10
any idea on how might go resolving this?
thanks in advance potential help.
apparently of pixel values contain zeros. if take log10(0)
, returns -inf
causes error.
try this:
c:\>gdal_calc.py -a "c:\users\moses\desktop\calc_test\test444.img" --outfile="c:\users\moses\desktop\calc_test\test555.img" --calc="10*log10(power(a+0.0001,2))-83" --debug --overwrite
or set 0 values na.
Comments
Post a Comment