[GRASS-SVN] r41064 - grass/branches/releasebranch_6_4/vector/v.parallel2

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Feb 17 19:11:18 EST 2010


Author: hamish
Date: 2010-02-17 19:11:17 -0500 (Wed, 17 Feb 2010)
New Revision: 41064

Modified:
   grass/branches/releasebranch_6_4/vector/v.parallel2/Makefile
   grass/branches/releasebranch_6_4/vector/v.parallel2/description.html
   grass/branches/releasebranch_6_4/vector/v.parallel2/local_proto.h
   grass/branches/releasebranch_6_4/vector/v.parallel2/main.c
Log:
backwawrds compatibility with v.parallel from GRASS 6.2 (trac #911; merge from devbr6 r41042)


Property changes on: grass/branches/releasebranch_6_4/vector/v.parallel2/Makefile
___________________________________________________________________
Added: svn:mime-type
   + text/x-makefile

Modified: grass/branches/releasebranch_6_4/vector/v.parallel2/description.html
===================================================================
--- grass/branches/releasebranch_6_4/vector/v.parallel2/description.html	2010-02-17 17:59:30 UTC (rev 41063)
+++ grass/branches/releasebranch_6_4/vector/v.parallel2/description.html	2010-02-18 00:11:17 UTC (rev 41064)
@@ -1,6 +1,6 @@
 <H2>DESCRIPTION</H2>
 
-<EM>v.parallel</EM> create parallel line to input vector lines which
+<EM>v.parallel</EM> creates parallel lines to the input vector lines which
 can be used as half-buffers.
 
 <H2>SEE ALSO</H2>
@@ -14,4 +14,5 @@
 Radim Blazek<br>
 Rewritten by Rosen Matev (with support through the Google Summer of Code program 2008)
 
-<p><i>Last changed: $Date: 2005-11-15 07:46:14 +0100 (Tue, 15 Nov 2005) $</i>
+<p>
+<i>Last changed: $Date$</i>


Property changes on: grass/branches/releasebranch_6_4/vector/v.parallel2/description.html
___________________________________________________________________
Added: svn:mime-type
   + text/html
Added: svn:keywords
   + Author Date Id
Added: svn:eol-style
   + native


Property changes on: grass/branches/releasebranch_6_4/vector/v.parallel2/local_proto.h
___________________________________________________________________
Added: svn:mime-type
   + text/x-chdr

Modified: grass/branches/releasebranch_6_4/vector/v.parallel2/main.c
===================================================================
--- grass/branches/releasebranch_6_4/vector/v.parallel2/main.c	2010-02-17 17:59:30 UTC (rev 41063)
+++ grass/branches/releasebranch_6_4/vector/v.parallel2/main.c	2010-02-18 00:11:17 UTC (rev 41064)
@@ -52,7 +52,7 @@
     dista_opt->key = "distance";
     dista_opt->type = TYPE_DOUBLE;
     dista_opt->required = YES;
-    dista_opt->options = "0-100000000";
+    /* dista_opt->options = "0-100000000"; */
     dista_opt->multiple = NO;
     dista_opt->description = _("Offset along major axis in map units");
 
@@ -70,7 +70,7 @@
     angle_opt->required = NO;
     angle_opt->answer = "0";
     angle_opt->multiple = NO;
-    angle_opt->description = _("Angle of major axis in degrees");
+    angle_opt->description = _("Angle of major axis in degrees"); /* CW or CCW? or this does nothing at all?? */
 
     side_opt = G_define_option();
     side_opt->key = "side";
@@ -110,7 +110,7 @@
     if (distb_opt->answer)
 	db = atof(distb_opt->answer);
     else
-	db = da;
+	db = fabs(da);
 
     if (angle_opt->answer)
 	dalpha = atof(angle_opt->answer);
@@ -129,6 +129,13 @@
     else
 	side = 0;
 
+    /* backwawrds compatibility with v.parallel from GRASS 6.2,
+       where negative distances mean left side */
+    if (da < 0) {
+	da *= -1;
+	side = -1;
+    }
+
     Vect_set_open_level(2);
     Vect_open_old(&In, in_opt->answer, "");
     Vect_open_new(&Out, out_opt->answer, 0);


Property changes on: grass/branches/releasebranch_6_4/vector/v.parallel2/main.c
___________________________________________________________________
Added: svn:mime-type
   + text/x-csrc



More information about the grass-commit mailing list