[gdal-dev] gdal_calc.py IF ELSE Condition

Gabriele N. gis.gn at libero.it
Thu Jun 30 06:25:49 PDT 2016


Hi all,

my goal is to apply the following condition:

if map A > 0 then MAP C = arctan((A/B)+180  ELSE MAP C = 90-arctan(A/B)

I tried in several ways, including this:

gdal_calc.py -A u-wind$DATE.tif -B  v-wind$DATE.tif
--outfile=dir_wind_$DATE.tif --calc="arctan(A/B)+180*(A>0)
w_dir=90-arctan(A/B))" 

but I can not fix it

Thanks for help



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/gdal-calc-py-IF-ELSE-Condition-tp5274166.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list