[GRASSLIST:1669] Re: A problem in using r.mapcalc

Glynn Clements glynn.clements at virgin.net
Tue Nov 4 08:57:23 EST 2003


temiz wrote:

> I encountered a problem in using r.mapcalc.
> I try to create a new map using atan function from two maps that
> comprise sin and cosine values in radian.
> 
> I used this expression :
> r.mapcalc dene='atan(cosine_map*180/3.14,sine_map*180/3.14)'
> But it only gives 45 and 225 values.
> When I check this formula with known values. It gives correct
> values:
> for example r.mapcalc dene='atan(0.838670*180/3.14,0.544639*180/3.14)'
> it gives correct value: 33
> 
> Does anyone have any idea ?

For all x > 0:

	atan(x,x)   == 45
	atan(-x,-x) == 225

Your results suggest that your sine and cosine maps are identical.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-user mailing list