[GRASS-SVN] r73771 - grass-addons/grass7/raster/r.area

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Dec 5 19:58:45 PST 2018


Author: annakrat
Date: 2018-12-05 19:58:45 -0800 (Wed, 05 Dec 2018)
New Revision: 73771

Modified:
   grass-addons/grass7/raster/r.area/main.c
Log:
r.area: area with largest cat was never removed; greater option worked only with lesser

Modified: grass-addons/grass7/raster/r.area/main.c
===================================================================
--- grass-addons/grass7/raster/r.area/main.c	2018-12-05 16:20:39 UTC (rev 73770)
+++ grass-addons/grass7/raster/r.area/main.c	2018-12-06 03:58:45 UTC (rev 73771)
@@ -121,14 +121,14 @@
         }
     }                                /* end for row */
 
-    if (les) {
-        for (i = 1; i < c_max; ++i)
+    if (les != 0 || grt != -1) {
+        for (i = 1; i < c_max + 1; ++i)
             if (ncells[i] < les || ncells[i] > gt)
                 ncells[i] = -1;
     }
 
     if (binary) {
-        for (i = 1; i < c_max; ++i)
+        for (i = 1; i < c_max + 1; ++i)
             ncells[i] = ncells[i] < les ? -1 : 1;
     }
 



More information about the grass-commit mailing list