Il 30/06/2016 15:25, Gabriele N. ha scritto:
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))"

Ciao Gabriele,
try with (not tested):

--calc="arctan(A/B)*180/3.141592+180*(A>0)+(3.141592-arctan(A/B))*(A<=0)"

where arctan could be atan or something similar.

Antonio

--
Antonio Falciano
http://www.linkedin.com/in/antoniofalciano
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to