浏览代码

r.external: write support files

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@46891 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 14 年之前
父节点
当前提交
43ba244f99
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      raster/r.external/main.c

+ 3 - 0
raster/r.external/main.c

@@ -461,6 +461,7 @@ static void create_map(const char *input, int band, const char *output,
 		       const char *title, int flip)
 {
     struct History history;
+    struct Categories cats;
 
     Rast_put_cellhd(output, cellhd);
 
@@ -491,6 +492,8 @@ static void create_map(const char *input, int band, const char *output,
     Rast_write_history(output, &history);
 
     Rast_write_colors(output, G_mapset(), &info->colors);
+    Rast_init_cats(NULL, &cats);
+    Rast_write_cats((char *)output, &cats);
 
     if (title)
 	Rast_put_cell_title(output, title);