[GRASS-SVN] r39400 - grass/trunk/imagery/i.rgb.his
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Oct 5 02:36:13 EDT 2009
Author: hamish
Date: 2009-10-05 02:36:11 -0400 (Mon, 05 Oct 2009)
New Revision: 39400
Modified:
grass/trunk/imagery/i.rgb.his/closefiles.c
Log:
write metadata (merge from devbr6)
Modified: grass/trunk/imagery/i.rgb.his/closefiles.c
===================================================================
--- grass/trunk/imagery/i.rgb.his/closefiles.c 2009-10-05 06:33:11 UTC (rev 39399)
+++ grass/trunk/imagery/i.rgb.his/closefiles.c 2009-10-05 06:36:11 UTC (rev 39400)
@@ -13,6 +13,7 @@
int i;
struct Colors colors;
struct Range range;
+ struct History history;
CELL min, max;
const char *mapset;
@@ -23,6 +24,8 @@
mapset = G_mapset();
+ /* write colors */
+ /* set to 0,max_level instead of min,max ?? */
Rast_read_range(h_name, mapset, &range);
Rast_get_range_min_max(&range, &min, &max);
Rast_make_grey_scale_colors(&colors, min, max);
@@ -38,5 +41,22 @@
Rast_make_grey_scale_colors(&colors, min, max);
Rast_write_colors(s_name, mapset, &colors);
+ /* write metadata */
+ Rast_short_history(h_name, "raster", &history);
+ Rast_command_history(&history);
+ Rast_write_history(h_name, &history);
+ Rast_put_cell_title(h_name, "Image hue");
+
+ Rast_short_history(i_name, "raster", &history);
+ Rast_command_history(&history);
+ Rast_write_history(i_name, &history);
+ Rast_put_cell_title(i_name, "Image intensity");
+
+ Rast_short_history(s_name, "raster", &history);
+ Rast_command_history(&history);
+ Rast_write_history(s_name, &history);
+ Rast_put_cell_title(s_name, "Image saturation");
+
return 0;
}
+
More information about the grass-commit
mailing list