[GRASS-SVN] r45812 - grass-addons/display/d.barb
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Mar 30 02:09:40 EDT 2011
Author: hamish
Date: 2011-03-29 23:09:40 -0700 (Tue, 29 Mar 2011)
New Revision: 45812
Modified:
grass-addons/display/d.barb/draw.c
grass-addons/display/d.barb/main.c
Log:
orient wind barbs the right way around (feather is downwind)
Modified: grass-addons/display/d.barb/draw.c
===================================================================
--- grass-addons/display/d.barb/draw.c 2011-03-30 05:25:03 UTC (rev 45811)
+++ grass-addons/display/d.barb/draw.c 2011-03-30 06:09:40 UTC (rev 45812)
@@ -218,13 +218,17 @@
G_debug(4, "draw_feather()");
- /* barb points to FROM direction */
angle = compass_deg - 90;
if (angle < 0)
angle += 360;
else if (angle > 360)
angle -= 360;
+ /* barb points to FROM direction */
+ angle += 180;
+ if (angle > 360)
+ angle -= 360;
+
rot_angle = angle + 60;
if (rot_angle > 360)
rot_angle -= 360;
Modified: grass-addons/display/d.barb/main.c
===================================================================
--- grass-addons/display/d.barb/main.c 2011-03-30 05:25:03 UTC (rev 45811)
+++ grass-addons/display/d.barb/main.c 2011-03-30 06:09:40 UTC (rev 45812)
@@ -32,6 +32,7 @@
*color_opt, *type_opt, *skip_opt, *scale_opt,
*vinput_opt, *vlayer_opt, *style_opt, *keyat_opt,
*keyvelo_opt, *keyfont_opt, *peak_opt;
+ struct Flag *from_to;
int color, aspect_type, skip, vlayer, style;
int is_vector, is_component; /* boolean */
@@ -150,6 +151,12 @@
keyfont_opt->description = _("Font size used in legend");
keyfont_opt->guisection = _("Legend");
+ /* TODO */
+ from_ro = G_define_flag();
+ from_to->key = 'r';
+ from_to->description =
+ _("Reverse direction 180 degrees");
+
if (G_parser(argc, argv))
exit(EXIT_FAILURE);
More information about the grass-commit
mailing list