[GRASS-SVN] r73333 - grass/branches/releasebranch_7_4/vector/v.category

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Sep 15 13:01:06 PDT 2018


Author: mmetz
Date: 2018-09-15 13:01:06 -0700 (Sat, 15 Sep 2018)
New Revision: 73333

Modified:
   grass/branches/releasebranch_7_4/vector/v.category/main.c
   grass/branches/releasebranch_7_4/vector/v.category/v.category.html
Log:
v.category: explain option=report (fixes #3643, backport trunk r73331)

Modified: grass/branches/releasebranch_7_4/vector/v.category/main.c
===================================================================
--- grass/branches/releasebranch_7_4/vector/v.category/main.c	2018-09-15 20:00:54 UTC (rev 73332)
+++ grass/branches/releasebranch_7_4/vector/v.category/main.c	2018-09-15 20:01:06 UTC (rev 73333)
@@ -668,7 +668,7 @@
 			    freps[i]->max[FR_ALL]);
 	    }
 	    else {
-		if (freps[i]->table != '\0') {
+		if (freps[i]->table != NULL) {
 		    fprintf(stdout, "%s: %d/%s\n", _("Layer/table"),
 			    freps[i]->field, freps[i]->table);
 		}

Modified: grass/branches/releasebranch_7_4/vector/v.category/v.category.html
===================================================================
--- grass/branches/releasebranch_7_4/vector/v.category/v.category.html	2018-09-15 20:00:54 UTC (rev 73332)
+++ grass/branches/releasebranch_7_4/vector/v.category/v.category.html	2018-09-15 20:01:06 UTC (rev 73333)
@@ -37,7 +37,7 @@
     
 <p>Areas are a special case because it is impossible to attach a cat to
 an area without a centroid; in this case, the module places new
-centroids in areas automatically.
+centroids in areas automatically for <b>type=area</b>.
 
 <p>The <b>cat</b> parameter is only used with <b>option</b>=<i>add</i>, 
 <b>option</b>=<i>sum</i> and <b>option</b>=<i>del</i>.
@@ -48,6 +48,11 @@
 will be deleted. By default, <b>cat</b> is set to <i>1</i> which means 
 that only categories of value <i>1</i> will be deleted. 
 
+<p>With <b>option=report</b>, the module reports for each layer and 
+type the total number of categories, the minimum and the maximum 
+category number. If there are e.g. two lines with line 1 having 
+category 1 and line 1 having categories 1 and 2, then there are a total 
+of three category values with minimum 1 and maximum 2.  
 
 <p>The <b>ids</b> parameter specifies the list of feature IDs to which the
 operation is performed; by default, all vector feature ids are processed. 



More information about the grass-commit mailing list