[GRASS-dev] d.barb: call for testing

Hamish hamish_b at yahoo.com
Wed Apr 27 05:11:41 EDT 2011


Hi,

I have added a new C module in the addons svn which will draw wind barbs,
straw plots, and arrow plots from a raster array or sparse vector point
data. It can use either direction + magnitude, or u + v components as the
input, and can produce a legend key.

Some of this functionality is already covered by d.rast.arrow and d.vect,
but I thought I'd bring it together into a dedicated tool and add some
commonly needed options.

It's still a work in progress, and there are still a few things on the
todo list, but I think it's ready to get some testing now.

Once the bugs are out and the design & feature set have been finalized
I'd port it to grass7 and hope to add it to the main distribution + GUI.
(One weird thing I notice is that in the tcl/tk GUI the legend_at=
option appears as a tick box not a text entry field. ?)


  http://grass.osgeo.org/wiki/GRASS_AddOns#d.barb
  http://trac.osgeo.org/grass/browser/grass-addons/display/d.barb

screenshot:  (style=arrow)
  http://bambi.otago.ac.nz/hamish/grass/screenshots/narr-a_221_20100629_1800_000_10m_winds.png


maybe g.extension works to install it if you compiled grass yourself?
 (I haven't tried installing it that way yet)

comments, wishes, & criticisms welcome.  usage follows, see the help
page for more explanation & examples.


Hamish



--------------------------------------

GRASS65> d.barb --help

Description:
 Draws flow barbs.

Keywords:
 

Usage:
 d.barb [-r] [direction=name] [magnitude=name] [u=name] [v=name]
   [input=name] [layer=value] [style=string] [color=name] [skip=value]
   [scale=value] [peak=value] [aspect_type=string]
   [legend_at=x,y[,x,y,...]] [legend_velo=value[,value,...]]
   [legend_fontsize=value] [--verbose] [--quiet]

Flags:
  -r   Rotate direction 180 degrees
        Useful for switching between atmospheric and oceanographic conventions
 --v   Verbose module output
 --q   Quiet module output

Parameters:
        direction   Raster map (or attribute column) containing velocity direction
        magnitude   Raster map (or attribute column) containing velocity magnitude
                u   Raster map (or attribute column) containing u-component of velocity
                v   Raster map (or attribute column) containing v-component of velocity
            input   Name of input vector map
            layer   Layer number
                     A single vector map can be connected to multiple database tables. This number determines which table to use.
                    default: 1
            style   Style
                    options: arrow,barb,straw
                    default: arrow
            color   Color
                     Either a standard color name or R:G:B triplet
                    default: black
             skip   Draw arrow every Nth grid cell
                    default: 10
            scale   Scale factor for arrow rendering
                    default: 1.0
             peak   Maximum value for scaling (overrides map's maximum)
      aspect_type   Direction map aspect type
                    options: cartesian,compass
                    default: cartesian
        legend_at   Screen percentage for legend barb ([0,0] is bottom-left)
                     Draws a single barb and exits
                    options: 0-100
                    default: 10.0,10.0
      legend_velo   Velocity for legend key arrow
  legend_fontsize   Font size used in legend
                    default: 14


More information about the grass-dev mailing list