[GRASS-SVN] r52831 - grass/trunk/vector/v.build.polylines
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Aug 22 03:46:16 PDT 2012
Author: mmetz
Date: 2012-08-22 03:46:15 -0700 (Wed, 22 Aug 2012)
New Revision: 52831
Modified:
grass/trunk/vector/v.build.polylines/main.c
Log:
v.build.polylines: do not throw away area attributes
Modified: grass/trunk/vector/v.build.polylines/main.c
===================================================================
--- grass/trunk/vector/v.build.polylines/main.c 2012-08-21 20:30:10 UTC (rev 52830)
+++ grass/trunk/vector/v.build.polylines/main.c 2012-08-22 10:46:15 UTC (rev 52831)
@@ -101,7 +101,7 @@
int points_in_polyline;
int start_line;
int nlines;
- int write_cats;
+ int write_cats, copy_tables;
int type, ltype;
@@ -183,6 +183,8 @@
/* 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++) {
Vect_reset_cats(Cats);
@@ -194,6 +196,7 @@
/* 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;
continue;
}
@@ -225,7 +228,7 @@
polyline, Vect_get_name(&Out), Vect_get_mapset(&Out));
/* Copy (all linked) tables if needed */
- if (write_cats != NO_CATS) {
+ if (copy_tables) {
if (Vect_copy_tables(&map, &Out, 0))
G_warning(_("Failed to copy attribute table to output map"));
}
More information about the grass-commit
mailing list