[GRASS-SVN] r62828 - in grass/trunk: display/d.his raster/r.his
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Nov 19 19:53:41 PST 2014
Author: wenzeslaus
Date: 2014-11-19 19:53:41 -0800 (Wed, 19 Nov 2014)
New Revision: 62828
Modified:
grass/trunk/display/d.his/d.his.html
grass/trunk/display/d.his/main.c
grass/trunk/raster/r.his/main.c
grass/trunk/raster/r.his/r.his.html
Log:
d.his and r.his: use whole words in the option names rather than letters, do not repeat obvious map in option names (breaks d.shadedmap)
Modified: grass/trunk/display/d.his/d.his.html
===================================================================
--- grass/trunk/display/d.his/d.his.html 2014-11-20 03:33:49 UTC (rev 62827)
+++ grass/trunk/display/d.his/d.his.html 2014-11-20 03:53:41 UTC (rev 62828)
@@ -23,9 +23,9 @@
This program can be run non-interactively or
interactively. It will run non-interactively if the user
specifies on the command line the name of a map containing
-hue values (<b>h_map</b>), and the name(s) of map(s)
-containing intensity values (<b>i_map</b>) and/or
-saturation values (<b>s_map</b>). The resulting image will
+hue values (<b>hue</b>), and the name(s) of map(s)
+containing intensity values (<b>intensity</b>) and/or
+saturation values (<b>saturation</b>). The resulting image will
be displayed in the active display frame on the graphics
monitor.
@@ -63,9 +63,9 @@
Each map cell is processed individually. First, the working
color is set to the color of the corresponding cell in the
-map layer chosen to represent <em>HUE</em>. Second, this
+map layer chosen to represent <em>hue</em>. Second, this
color is multiplied by the <em>red</em> intensity of that
-cell in the <em>INTENSITY</em> map layer. This map layer
+cell in the <em>intensity</em> map layer. This map layer
should have an appropriate gray-scale color table
associated with it. You can ensure this by using the color
manipulation capabilities of
@@ -73,7 +73,7 @@
Finally, the color is made somewhat gray-based on the
<em>red</em> intensity of that cell in the
-<em>SATURATION</em> map layer. Again, this map layer
+<em>saturation</em> map layer. Again, this map layer
should have a gray-scale color table associated with it.
<h2>NOTES</h2>
@@ -104,13 +104,13 @@
<h2>EXAMPLE</h2>
-<h3>Spearfish dataset</h3>
<div class="code"><pre>
-g.region rast=elevation.dem
-r.shaded.relief map=elevation.dem shad=elev.shad_relf
+g.region rast=elevation
+r.shaded.relief input=elevation output=elevation_shaded_relief
+
d.mon wx0
-d.his h=elevation.dem i=elev.shad_relf brighten=50
+d.his hue=elevation intensity=elevation_shaded_relief brighten=50
</pre></div>
<h2>SEE ALSO</h2>
@@ -119,6 +119,7 @@
<a href="d.colortable.html">d.colortable</a>,
<a href="d.frame.html">d.frame</a>,
<a href="d.rgb.html">d.rgb</a>,
+<a href="d.shadedmap.html">d.shadedmap</a>,
<a href="r.colors.html">r.colors</a>,
<a href="r.his.html">r.his</a>,
<a href="i.his.rgb.html">i.his.rgb</a>,
Modified: grass/trunk/display/d.his/main.c
===================================================================
--- grass/trunk/display/d.his/main.c 2014-11-20 03:33:49 UTC (rev 62827)
+++ grass/trunk/display/d.his/main.c 2014-11-20 03:53:41 UTC (rev 62828)
@@ -67,29 +67,29 @@
G_add_keyword("IHS");
module->description =
_("Displays the result obtained by combining "
- "hue, intensity, and saturation (his) values "
+ "hue, intensity, and saturation (HIS) values "
"from user-specified input raster map layers.");
opt_h = G_define_option();
- opt_h->key = "h_map";
+ opt_h->key = "hue";
opt_h->type = TYPE_STRING;
opt_h->required = YES;
opt_h->gisprompt = "old,cell,raster";
- opt_h->description = _("Name of layer to be used for HUE");
+ opt_h->description = _("Name of layer to be used for hue");
opt_i = G_define_option();
- opt_i->key = "i_map";
+ opt_i->key = "intensity";
opt_i->type = TYPE_STRING;
opt_i->required = NO;
opt_i->gisprompt = "old,cell,raster";
- opt_i->description = _("Name of layer to be used for INTENSITY");
+ opt_i->description = _("Name of layer to be used for intensity");
opt_s = G_define_option();
- opt_s->key = "s_map";
+ opt_s->key = "saturation";
opt_s->type = TYPE_STRING;
opt_s->required = NO;
opt_s->gisprompt = "old,cell,raster";
- opt_s->description = _("Name of layer to be used for SATURATION");
+ opt_s->description = _("Name of layer to be used for saturation");
brighten = G_define_option();
brighten->key = "brighten";
Modified: grass/trunk/raster/r.his/main.c
===================================================================
--- grass/trunk/raster/r.his/main.c 2014-11-20 03:33:49 UTC (rev 62827)
+++ grass/trunk/raster/r.his/main.c 2014-11-20 03:53:41 UTC (rev 62828)
@@ -65,51 +65,51 @@
G_add_keyword("HIS");
G_add_keyword("IHS");
module->description =
- _("Generates red, green and blue raster map layers "
+ _("Generates red, green and blue (RGB) raster map layers "
"combining hue, intensity and saturation (HIS) "
"values from user-specified input raster map layers.");
opt_h = G_define_option();
- opt_h->key = "h_map";
+ opt_h->key = "hue";
opt_h->type = TYPE_STRING;
opt_h->required = YES;
opt_h->gisprompt = "old,cell,raster";
- opt_h->description = _("Name of layer to be used for HUE");
+ opt_h->description = _("Name of layer to be used for hue");
opt_i = G_define_option();
- opt_i->key = "i_map";
+ opt_i->key = "intensity";
opt_i->type = TYPE_STRING;
opt_i->required = NO;
opt_i->gisprompt = "old,cell,raster";
- opt_i->description = _("Name of layer to be used for INTENSITY");
+ opt_i->description = _("Name of layer to be used for intensity");
opt_s = G_define_option();
- opt_s->key = "s_map";
+ opt_s->key = "saturation";
opt_s->type = TYPE_STRING;
opt_s->required = NO;
opt_s->gisprompt = "old,cell,raster";
- opt_s->description = _("Name of layer to be used for SATURATION");
+ opt_s->description = _("Name of layer to be used for saturation");
opt_r = G_define_option();
- opt_r->key = "r_map";
+ opt_r->key = "red";
opt_r->type = TYPE_STRING;
opt_r->required = YES;
opt_r->gisprompt = "new,cell,raster";
- opt_r->description = _("Name of output layer to be used for RED");
+ opt_r->description = _("Name of output layer to be used for red");
opt_g = G_define_option();
- opt_g->key = "g_map";
+ opt_g->key = "green";
opt_g->type = TYPE_STRING;
opt_g->required = YES;
opt_g->gisprompt = "new,cell,raster";
- opt_g->description = _("Name of output layer to be used for GREEN");
+ opt_g->description = _("Name of output layer to be used for green");
opt_b = G_define_option();
- opt_b->key = "b_map";
+ opt_b->key = "blue";
opt_b->type = TYPE_STRING;
opt_b->required = YES;
opt_b->gisprompt = "new,cell,raster";
- opt_b->description = _("Name of output layer to be used for BLUE");
+ opt_b->description = _("Name of output layer to be used for blue");
nulldraw = G_define_flag();
nulldraw->key = 'n';
Modified: grass/trunk/raster/r.his/r.his.html
===================================================================
--- grass/trunk/raster/r.his/r.his.html 2014-11-20 03:33:49 UTC (rev 62827)
+++ grass/trunk/raster/r.his/r.his.html 2014-11-20 03:53:41 UTC (rev 62828)
@@ -41,16 +41,16 @@
Each map cell is processed individually. First, the working
color is set to the color of the corresponding cell in the
-map layer chosen to represent <i>HUE</i>. Second, this
+map layer chosen to represent <i>hue</i>. Second, this
color is multiplied by the <i>red</i> intensity of that
-cell in the <i>INTENSITY</i> map layer. This map layer
+cell in the <i>intensity</i> map layer. This map layer
should have an appropriate gray-scale color table
associated with it. You can ensure this by using the color
manipulation capabilities of
<em><a href="r.colors.html">r.colors</a></em>.
Finally, the color is made somewhat gray-based on the
<i>red</i> intensity of that cell in the
-<i>SATURATION</i> map layer. Again, this map layer
+<i>saturation</i> map layer. Again, this map layer
should have a gray-scale color table associated with it.
<h2>NOTES</h2>
@@ -88,18 +88,27 @@
<h2>EXAMPLES</h2>
-Recreate the following <em>d.his</em> command using <em>r.his</em>:
+Recreate the following example for <em>d.his</em> using <em>r.his</em>.
+First, create shaded relief and show it.
+
<div class="code"><pre>
-g.regiopn rast=elevation
-r.shaded.relief map=elevation shad=elev.shad_relf
-d.his h=elevation i=elev.shad_relf brighten=50
+g.region rast=elevation
+r.shaded.relief input=elevation output=elevation_shaded_relief
+
+d.mon wx0
+d.his hue=elevation intensity=elevation_shaded_relief brighten=50
</pre></div>
+Second, compute lighter version of color of shaded relief.
+Then convert from HIS model to RGB and show the result.
+
<div class="code"><pre>
-r.mapcalc "elev.shad_relf_bright50 = #elev.shad_relf * 1.5"
-r.colors elev.shad_relf_bright50 color=grey255
-r.his h_map=elevation i_map=elev.shad_relf_bright50 r_map=esr.r g_map=esr.g bmap=esr.b
-d.rgb red=esr.r green=esr.g blue=esr.b
+r.mapcalc "elevation_shaded_relief_bright_50 = #elevation_shaded_relief * 1.5"
+r.colors elevation_shaded_relief_bright_50 color=grey255
+r.his hue=elevation intensity=elevation_shaded_relief_bright_50 red=shadedmap_r green=shadedmap_g blue=shadedmap_b
+
+d.mon wx1
+d.rgb red=shadedmap_r green=shadedmap_g blue=shadedmap_b
</pre></div>
@@ -113,6 +122,7 @@
<a href="r.colors.html">r.colors</a>,
<a href="r.composite.html">r.composite</a>,
<a href="r.mapcalc.html">r.mapcalc</a>,
+<a href="r.shadedmap.html">r.shadedmap</a>,
<a href="i.his.rgb.html">i.his.rgb</a>,
<a href="i.rgb.his.html">i.rgb.his</a>
</em>
More information about the grass-commit
mailing list