Browse Source

r.stats.zonal: +history in output

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@74217 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 6 years ago
parent
commit
ce500631a6
1 changed files with 5 additions and 0 deletions
  1. 5 0
      raster/r.stats.zonal/main.c

+ 5 - 0
raster/r.stats.zonal/main.c

@@ -87,6 +87,7 @@ int main(int argc, char **argv)
     int reclass;
     int base_fd, cover_fd;
     struct Categories cats;
+    struct History history;
     CELL *base_buf;
     DCELL *cover_buf;
     struct Range range;
@@ -517,6 +518,10 @@ int main(int argc, char **argv)
 
 	Rast_close(out_fd);
 
+	Rast_short_history(output, "raster", &history);
+	Rast_command_history(&history);
+	Rast_write_history(output, &history);
+
 	if (Rast_read_colors(covermap, "", &colors) > 0)
 	    Rast_write_colors(output, G_mapset(), &colors);
     }