Kaynağa Gözat

r.buildvrt,r.external: write more metadata

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@72770 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 7 yıl önce
ebeveyn
işleme
f278afaf7f
2 değiştirilmiş dosya ile 9 ekleme ve 2 silme
  1. 5 1
      raster/r.buildvrt/link.c
  2. 4 1
      raster/r.external/link.c

+ 5 - 1
raster/r.buildvrt/link.c

@@ -90,6 +90,7 @@ void create_map(const struct input *inputs, int num_inputs, const char *output,
     struct History history;
     struct Categories cats;
     struct Colors colors;
+    char buf[1024];
 
     Rast_put_cellhd(output, cellhd);
 
@@ -118,8 +119,11 @@ void create_map(const struct input *inputs, int num_inputs, const char *output,
 	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)

+ 4 - 1
raster/r.external/link.c

@@ -197,6 +197,7 @@ void create_map(const char *input, int band, const char *output,
 {
     struct History history;
     struct Categories cats;
+    char buf[1024];
 
     Rast_put_cellhd(output, cellhd);
 
@@ -222,8 +223,10 @@ void create_map(const char *input, int band, const char *output,
     }
 
     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);