[GRASS-dev] Script for converting degrees clockwise from North to GRASS convention

Moritz Lennert mlennert at club.worldonline.be
Wed Jan 23 05:54:48 PST 2013


On 23/01/13 13:59, Margherita Di Leo wrote:
> Hi Moritz,
>
> thank you for your reply,
>
> On Wed, Jan 23, 2013 at 12:21 PM, Moritz Lennert
> <mlennert at club.worldonline.be <mailto:mlennert at club.worldonline.be>> wrote:
>
>
>         If we call WIND the direction map which uses the convention degrees
>         clockwise from North, and GRASS the output map, the rule that I
>         applied is:
>
>         IF 0 <= WIND < 270     ;     GRASS = 270 - WIND
>         IF WIND = 270            ;      GRASS = 360
>         IF 270 < WIND < 360   ;      GRASS 630 - 0
>         IF WIND = null             ;     GRASS = 0
>         NULL otherwise (this latter I have added to check if there is
>         any error.
>
>
>     This is not correct.
>
>     WIND = 0 means North.
>
>
> Actually this was tricky also for me, but:
>
> Wind direction is measured in:
>
>     *
>
>       degrees clockwise from uphill (direction the wind is pushing the fire)
>
>     *
>
>       degrees clockwise from North (direction the wind is blowing from)
>
> If the wind is blowing FROM north, it means that the arrow is TOWARDS
> south.. Am I wrong?

I guess not, but this is a very specific application of angle direction. 
I think that if you want to create a generic module (r.convert.aspect or 
r.convert.angle) for transforming angles, then North should mean North. 
If for a specific application North means a direction a force is coming 
from, then the use should take that into account. In your case the 
original map gives the angle the wind is coming _from_, then the output 
should (IMHO) do the same.

Moritz


More information about the grass-dev mailing list