Philip Verhagen philip at
Tue Dec 17 05:34:57 EST 1996

> From owner-grassu at Sat Dec 14 01:19 eur 1996
> X-Authentication-Warning: listserv set sender to grassu using -f
> From: Giovanna Ranci <ranci at>
> To: grassu at
> Date: Fri, 13 Dec 96 19:35:28 MET
> Mailer: Elm [revision: 70.85]
> I need a FORMULA to calculate VARIANCE when arguments are ANGLES (in degree).
> For example, I need to calculate variance of aspect map in 3x3 neighborhood.
> Aspect is expressed in degrees. It's clear that a cell with value 5 and a cell with value 355 are almost the same aspect so variance formula has to consider it.
> I got already a formula with sin and cosine but there should be some mistakes in it
> (I calculate variance using command r.mapcalc and r.neighbors but results are strange...definetely unreal. I'm sure error is in the formula not in my procedure in Grassland).
> If somebody knows the rigth formula, I will be glad to receive it.
> Thanks,
> Giovanna Ranci Ortigosa
> e-mail: ranci at

It's a long time since I had trigonometry at school, but isn't it possible
to recalculate the aspect map in radians and calculate the variance from

Philip Verhagen


                     philip at

                              R  A  A  P

                        Plantage Muidergracht 14
                          1018 TV Amsterdam
                           The Netherlands

                        tel: +31 (20) 421 62 00
                        fax: +31 (20) 421 42 90



More information about the grass-user mailing list