[GRASS-SVN] r72497 - grass/branches/releasebranch_7_0/vector/v.random

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Mar 22 08:36:21 PDT 2018


Author: martinl
Date: 2018-03-22 08:36:21 -0700 (Thu, 22 Mar 2018)
New Revision: 72497

Modified:
   grass/branches/releasebranch_7_0/vector/v.random/main.c
Log:
v.random restrict wrong categories assigned, see #3524 (g70: merge r72416 + r72421 from trunk)

Modified: grass/branches/releasebranch_7_0/vector/v.random/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.random/main.c	2018-03-22 15:29:23 UTC (rev 72496)
+++ grass/branches/releasebranch_7_0/vector/v.random/main.c	2018-03-22 15:36:21 UTC (rev 72497)
@@ -556,6 +556,10 @@
 			G_debug(3, "    area = %d Vect_point_in_area() = %d", area, ret);
 
 			if (ret >= 1) {
+                            if (field > 0) {
+                                /* read categories for matched area */
+                                Vect_get_area_cats(&In, area, Cats);
+                            }
 			    outside = 0;
 			    break;
 			}



More information about the grass-commit mailing list