[GRASS5] [bug #3704] (grass) d.rast.arrow does not save a line in the monitor history

Daniel Calvelo Aros dcalvelo at minag.gob.pe
Wed Oct 12 16:22:12 EDT 2005


From: David Finlayson <dfinlays at u.washington.edu>
Sent: Wed, 12 Oct 2005 09:30:11 -0700
>
> Negative magnitudes are valid data. For example, one convention for
> identifying direction (not used in d.rast.arrow) is to list only the
> magnitudes U and V (x and y directions respectively). In this
> convention, arrow direction is found by taking the arctangent of V/U.
> In this case negative magnitudes are essential.
> 
> In the (direction, magnitude) convention adopted here for
> d.rast.arrow, negative magnitudes are unnecessary, but they don't
> violate any mathematical or logical rules that I am aware of. 

Absolutely.

> I would
> leave them in and make a note in the manual how they are handled.

In that case, color them differently by default, and *optionally* have them
follow the (dir,mag) == (dir + pi mod pi, -mag) identity in the same color.
I'm sure there are applications where (45deg,1) doesn't mean the same as
(225deg,-1), and the original application insisted on positive magnitudes.

Then you don't need a warning (or maybe you do for scripting purposes) but the
user has a visual cue about the presence of negative values in her data. And
mentioning that in the docs pointing to r.mapcalc options I think is consensus
so far.

Daniel.




More information about the grass-dev mailing list