[GRASS-SVN] r52840 - grass/trunk/vector/v.build.polylines

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Aug 22 13:13:47 PDT 2012


Author: mmetz
Date: 2012-08-22 13:13:46 -0700 (Wed, 22 Aug 2012)
New Revision: 52840

Modified:
   grass/trunk/vector/v.build.polylines/main.c
   grass/trunk/vector/v.build.polylines/v.build.polylines.html
Log:
v.build.polylines: code cosmetics, manual

Modified: grass/trunk/vector/v.build.polylines/main.c
===================================================================
--- grass/trunk/vector/v.build.polylines/main.c	2012-08-22 19:35:14 UTC (rev 52839)
+++ grass/trunk/vector/v.build.polylines/main.c	2012-08-22 20:13:46 UTC (rev 52840)
@@ -6,9 +6,9 @@
  *               Major rewrite by Radim Blazek, October 2002
  *               Glynn Clements <glynn gclements.plus.com>, Markus Neteler <neteler itc.it>
  *               Martin Landa <landa.martin gmail.com> (cats)
- *               Markus Metz (geometry type management)
+ *               Markus Metz (geometry type management, cats, attributes)
  * PURPOSE:      
- * COPYRIGHT:    (C) 2002-2011 by the GRASS Development Team
+ * COPYRIGHT:    (C) 2002-2012 by the GRASS Development Team
  *
  *               This program is free software under the GNU General Public
  *               License (>=v2). Read the file COPYING that comes with GRASS
@@ -183,7 +183,7 @@
     /* Step over all lines in binary map */
     polyline = 0;
     nlines = 0;
-    
+
     copy_tables = (write_cats != NO_CATS);
 
     for (line = 1; line <= Vect_get_num_lines(&map); line++) {
@@ -196,7 +196,8 @@
 	    /* copy points to output as they are, with cats */
 	    Vect_read_line(&map, points, Cats, line);
 	    Vect_write_line(&Out, ltype, points, Cats);
-	    copy_tables = 1;
+	    if (Cats->n_cats > 0)
+		copy_tables = 1;
 	    continue;
 	}
 

Modified: grass/trunk/vector/v.build.polylines/v.build.polylines.html
===================================================================
--- grass/trunk/vector/v.build.polylines/v.build.polylines.html	2012-08-22 19:35:14 UTC (rev 52839)
+++ grass/trunk/vector/v.build.polylines/v.build.polylines.html	2012-08-22 20:13:46 UTC (rev 52840)
@@ -78,6 +78,6 @@
 Mark Lake, Institute of Archaeology, University College London.<br> 
 Major rewrite by Radim Blazek, October 2002<br>
 Category mode added by Martin Landa, FBK-irst, Trento, Italy, October 2007<br>
-Support for different line types by Markus Metz
+Support for categories, attributes, and different line types by Markus Metz
 
 <p><i>Last changed: $Date$</i>



More information about the grass-commit mailing list