[GRASS-SVN] r72770 - in grass/trunk/raster: r.buildvrt r.external

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jun 5 12:33:32 PDT 2018


Author: mmetz
Date: 2018-06-05 12:33:32 -0700 (Tue, 05 Jun 2018)
New Revision: 72770

Modified:
   grass/trunk/raster/r.buildvrt/link.c
   grass/trunk/raster/r.external/link.c
Log:
r.buildvrt,r.external: write more metadata

Modified: grass/trunk/raster/r.buildvrt/link.c
===================================================================
--- grass/trunk/raster/r.buildvrt/link.c	2018-06-05 01:17:32 UTC (rev 72769)
+++ grass/trunk/raster/r.buildvrt/link.c	2018-06-05 19:33:32 UTC (rev 72770)
@@ -90,6 +90,7 @@
     struct History history;
     struct Categories cats;
     struct Colors colors;
+    char buf[1024];
 
     Rast_put_cellhd(output, cellhd);
 
@@ -118,8 +119,11 @@
 	Rast_write_rstats(output, ostats);
 
     G_verbose_message(_("Creating support files for %s"), output);
-    Rast_short_history(output, "raster", &history);
+    Rast_short_history(output, "virtual", &history);
     Rast_command_history(&history);
+    Rast_format_history(&history, HIST_KEYWRD, _("virtual raster generated by %s"), G_program_name());
+    sprintf(buf, "%d raster maps", num_inputs);
+    Rast_set_history(&history, HIST_DATSRC_1, buf);
     Rast_write_history(output, &history);
 
     if (Rast_read_colors(inputs[0].name, inputs[0].mapset, &colors) == 1)

Modified: grass/trunk/raster/r.external/link.c
===================================================================
--- grass/trunk/raster/r.external/link.c	2018-06-05 01:17:32 UTC (rev 72769)
+++ grass/trunk/raster/r.external/link.c	2018-06-05 19:33:32 UTC (rev 72770)
@@ -197,6 +197,7 @@
 {
     struct History history;
     struct Categories cats;
+    char buf[1024];
 
     Rast_put_cellhd(output, cellhd);
 
@@ -222,8 +223,10 @@
     }
 
     G_verbose_message(_("Creating support files for %s"), output);
-    Rast_short_history(output, "raster", &history);
+    Rast_short_history(output, "GDAL-link", &history);
     Rast_command_history(&history);
+    sprintf(buf, "%s band %d", input, band);
+    Rast_set_history(&history, HIST_DATSRC_1, buf);
     Rast_write_history(output, &history);
 
     Rast_write_colors(output, G_mapset(), &info->colors);



More information about the grass-commit mailing list