[GRASS-SVN] r34371 - in grass/branches/develbranch_6/imagery:
i.his.rgb i.rgb.his
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Nov 18 11:32:16 EST 2008
Author: martinl
Date: 2008-11-18 11:32:16 -0500 (Tue, 18 Nov 2008)
New Revision: 34371
Modified:
grass/branches/develbranch_6/imagery/i.his.rgb/h2rmain.c
grass/branches/develbranch_6/imagery/i.rgb.his/openfiles.c
grass/branches/develbranch_6/imagery/i.rgb.his/r2hmain.c
Log:
i.rgb.his & i.his.rgb: message standardization
Modified: grass/branches/develbranch_6/imagery/i.his.rgb/h2rmain.c
===================================================================
--- grass/branches/develbranch_6/imagery/i.his.rgb/h2rmain.c 2008-11-18 16:12:58 UTC (rev 34370)
+++ grass/branches/develbranch_6/imagery/i.his.rgb/h2rmain.c 2008-11-18 16:32:16 UTC (rev 34371)
@@ -10,7 +10,7 @@
* PURPOSE: Hue-intensity-saturation (his) to red-green-blue (rgb)
* raster map color transformation function.
*
- * COPYRIGHT: (C) 2007 by the GRASS Development Team
+ * COPYRIGHT: (C) 2007-2008 by the GRASS Development Team
*
* This program is free software under the GNU General Public
* License (>=v2). Read the file COPYING that comes with GRASS
@@ -42,35 +42,35 @@
/* Set description */
module = G_define_module();
- module->keywords = _("imagery");
+ module->keywords = _("imagery, color transformation, RGB, HIS");
module->description =
- _("Hue-intensity-saturation (his) to red-green-blue (rgb) "
- "raster map color transformation function.");
+ _("Transforms raster maps from HIS (Hue-Intensity-Saturation) color space to "
+ "RGB (Red-Green-Blue) color space.");
/* Define the different options */
opt_hue = G_define_standard_option(G_OPT_R_INPUT);
opt_hue->key = "hue_input";
- opt_hue->description = _("Hue map name");
+ opt_hue->description = _("Name of input raster map (hue)");
opt_int = G_define_standard_option(G_OPT_R_INPUT);
opt_int->key = "intensity_input";
- opt_int->description = _("Intensity map name");
+ opt_int->description = _("Name of input raster map (intensity)");
opt_sat = G_define_standard_option(G_OPT_R_INPUT);
opt_sat->key = "saturation_input";
- opt_sat->description = _("Saturation map name");
+ opt_sat->description = _("Name of input raster map (saturation)");
opt_red = G_define_standard_option(G_OPT_R_OUTPUT);
opt_red->key = "red_output";
- opt_red->description = _("Output map representing the red");
+ opt_red->description = _("Name for output raster map (red)");
opt_green = G_define_standard_option(G_OPT_R_OUTPUT);
opt_green->key = "green_output";
- opt_green->description = _("Output map representing the green");
+ opt_green->description = _("Name for output raster map (green)");
opt_blue = G_define_standard_option(G_OPT_R_OUTPUT);
opt_blue->key = "blue_output";
- opt_blue->description = _("Output map representing the blue");
+ opt_blue->description = _("Name for output raster map (blue)");
if (G_parser(argc, argv))
exit(EXIT_FAILURE);
@@ -91,7 +91,7 @@
/* read in a row from each cell map */
for (band = 0; band < 3; band++)
if (G_get_map_row(fd_input[band], rowbuffer[band], i) < 0)
- G_fatal_error(_("Cannot read row from raster map"));
+ G_fatal_error(_("Unable to read raster map row %d"), i);
/* process this row of the map */
his2rgb(rowbuffer, cols);
@@ -100,7 +100,7 @@
for (band = 0; band < 3; band++)
if (G_put_raster_row(fd_output[band], rowbuffer[band], CELL_TYPE)
< 0)
- G_fatal_error(_("Cannot write row to raster map"));
+ G_fatal_error(_("Failed writing raster map row %d"), i);
}
closefiles(opt_red->answer, opt_green->answer, opt_blue->answer,
Modified: grass/branches/develbranch_6/imagery/i.rgb.his/openfiles.c
===================================================================
--- grass/branches/develbranch_6/imagery/i.rgb.his/openfiles.c 2008-11-18 16:12:58 UTC (rev 34370)
+++ grass/branches/develbranch_6/imagery/i.rgb.his/openfiles.c 2008-11-18 16:32:16 UTC (rev 34371)
@@ -18,19 +18,19 @@
G_fatal_error(_("Raster map <%s> not found"), b_name);
if ((fd_input[0] = G_open_cell_old(r_name, mapset)) < 0)
- G_fatal_error(_("Cannot open raster map <%s>"), r_name);
+ G_fatal_error(_("Unable to open raster map <%s>"), r_name);
if ((fd_input[1] = G_open_cell_old(g_name, mapset)) < 0)
- G_fatal_error(_("Cannot open raster map <%s>"), g_name);
+ G_fatal_error(_("Unable to open raster map <%s>"), g_name);
if ((fd_input[2] = G_open_cell_old(b_name, mapset)) < 0)
- G_fatal_error(_("Cannot open raster map <%s>"), b_name);
+ G_fatal_error(_("Unable to open raster map <%s>"), b_name);
/* open output files */
if ((fd_output[0] = G_open_cell_new(h_name)) < 0)
- G_fatal_error(_("Cannot create raster map <%s>"), h_name);
+ G_fatal_error(_("Unable to create raster map <%s>"), h_name);
if ((fd_output[1] = G_open_cell_new(i_name)) < 0)
- G_fatal_error(_("Cannot create raster map <%s>"), i_name);
+ G_fatal_error(_("Unable to create raster map <%s>"), i_name);
if ((fd_output[2] = G_open_cell_new(s_name)) < 0)
- G_fatal_error(_("Cannot create raster map <%s>"), s_name);
+ G_fatal_error(_("Unable to create raster map <%s>"), s_name);
/* allocate the cell row buffer */
if ((rowbuf[0] = G_allocate_cell_buf()) == NULL)
Modified: grass/branches/develbranch_6/imagery/i.rgb.his/r2hmain.c
===================================================================
--- grass/branches/develbranch_6/imagery/i.rgb.his/r2hmain.c 2008-11-18 16:12:58 UTC (rev 34370)
+++ grass/branches/develbranch_6/imagery/i.rgb.his/r2hmain.c 2008-11-18 16:32:16 UTC (rev 34371)
@@ -10,7 +10,7 @@
* PURPOSE: Red-green-blue (rgb) to hue-intensity-saturation (his)
* raster map color transformation function
*
- * COPYRIGHT: (C) 2007 by the GRASS Development Team
+ * COPYRIGHT: (C) 2007-2008 by the GRASS Development Team
*
* This program is free software under the GNU General Public
* License (>=v2). Read the file COPYING that comes with GRASS
@@ -42,35 +42,35 @@
/* Set description */
module = G_define_module();
- module->keywords = _("imagery");
+ module->keywords = _("imagery, color transformation, RGB, HIS");
module->description =
- _("Red-green-blue (rgb) to hue-intensity-saturation (his) raster "
- "map color transformation function");
+ _("Transforms raster maps from RGB (Red-Green-Blue) color space to "
+ "HIS (Hue-Intensity-Saturation) color space.");
/* Define the different options */
opt_red = G_define_standard_option(G_OPT_R_INPUT);
opt_red->key = "red_input";
- opt_red->description = _("Red input raster map");
+ opt_red->description = _("Name of input raster map (red)");
opt_green = G_define_standard_option(G_OPT_R_INPUT);
opt_green->key = "green_input";
- opt_green->description = _("Green input raster map");
+ opt_green->description = _("Name of input raster map (green)");
opt_blue = G_define_standard_option(G_OPT_R_INPUT);
opt_blue->key = "blue_input";
- opt_blue->description = _("Blue input raster map");
+ opt_blue->description = _("Name of input raster map (blue)");
opt_hue = G_define_standard_option(G_OPT_R_OUTPUT);
opt_hue->key = "hue_output";
- opt_hue->description = _("Output hue raster map");
+ opt_hue->description = _("Name for output raster map (hue)");
opt_inten = G_define_standard_option(G_OPT_R_OUTPUT);
opt_inten->key = "intensity_output";
- opt_inten->description = _("Output intensity raster map");
+ opt_inten->description = _("Name for output raster map (intensity)");
opt_sat = G_define_standard_option(G_OPT_R_OUTPUT);
opt_sat->key = "saturation_output";
- opt_sat->description = _("Output saturation raster map");
+ opt_sat->description = _("Name for output raster map (saturation)");
if (G_parser(argc, argv))
exit(EXIT_FAILURE);
@@ -89,7 +89,7 @@
for (band = 0; band < 3; band++)
if (G_get_map_row(fd_input[band], rowbuffer[band], i) < 0)
- G_fatal_error(_("Cannot read row from raster map"));
+ G_fatal_error(_("Unable to read raster map row %d"), i);
/* process this row of the map */
rgb2his(rowbuffer, cols);
@@ -98,7 +98,7 @@
for (band = 0; band < 3; band++)
if (G_put_raster_row(fd_output[band], rowbuffer[band], CELL_TYPE)
< 0)
- G_fatal_error(_("Cannot write row to raster map"));
+ G_fatal_error(_("Failed writing raster map row %d"), i);
}
closefiles(opt_hue->answer, opt_inten->answer, opt_sat->answer,
More information about the grass-commit
mailing list