[GRASS-SVN] r73670 - grass/branches/releasebranch_7_4/vector/v.generalize

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Nov 13 06:53:48 PST 2018


Author: mmetz
Date: 2018-11-13 06:53:48 -0800 (Tue, 13 Nov 2018)
New Revision: 73670

Modified:
   grass/branches/releasebranch_7_4/vector/v.generalize/main.c
Log:
v.generalize: preserve boundary categories (backport trunk r73668)

Modified: grass/branches/releasebranch_7_4/vector/v.generalize/main.c
===================================================================
--- grass/branches/releasebranch_7_4/vector/v.generalize/main.c	2018-11-13 14:53:29 UTC (rev 73669)
+++ grass/branches/releasebranch_7_4/vector/v.generalize/main.c	2018-11-13 14:53:48 UTC (rev 73670)
@@ -44,7 +44,7 @@
 {
     struct Map_info In, Out, Error;
     struct line_pnts *Points;
-    struct line_cats *Cats;
+    struct line_cats *Cats, *ACats;
     int i, type, iter;
     struct GModule *module;	/* GRASS module for parsing arguments */
     struct Option *map_in, *map_out, *error_out, *thresh_opt, *method_opt,
@@ -317,6 +317,7 @@
 
     Points = Vect_new_line_struct();
     Cats = Vect_new_cats_struct();
+    ACats = Vect_new_cats_struct();
 
     Vect_check_input_output_name(map_in->answer, map_out->answer,
 				 G_FATAL_EXIT);
@@ -438,13 +439,13 @@
 			    right = Vect_get_isle_area(&Out, abs(right));
 
 			if (left > 0) {
-			    Vect_get_area_cats(&Out, left, Cats);
-			    do_line = Vect_cats_in_constraint(Cats, layer, cat_list);
+			    Vect_get_area_cats(&Out, left, ACats);
+			    do_line = Vect_cats_in_constraint(ACats, layer, cat_list);
 			}
 			
 			if (!do_line && right > 0) {
-			    Vect_get_area_cats(&Out, right, Cats);
-			    do_line = Vect_cats_in_constraint(Cats, layer, cat_list);
+			    Vect_get_area_cats(&Out, right, ACats);
+			    do_line = Vect_cats_in_constraint(ACats, layer, cat_list);
 			}
 		    }
 		    if (!do_line)



More information about the grass-commit mailing list