浏览代码

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)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@62828 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras 10 年之前
父节点
当前提交
759f811a0e
共有 4 个文件被更改,包括 52 次插入41 次删除
  1. 11 10
      display/d.his/d.his.html
  2. 7 7
      display/d.his/main.c
  3. 13 13
      raster/r.his/main.c
  4. 21 11
      raster/r.his/r.his.html

+ 11 - 10
display/d.his/d.his.html

@@ -23,9 +23,9 @@ retains the original information in terms of <em>hue</em>,
 This program can be run non-interactively or
 This program can be run non-interactively or
 interactively.  It will run non-interactively if the user
 interactively.  It will run non-interactively if the user
 specifies on the command line the name of a map containing
 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
 be displayed in the active display frame on the graphics
 monitor.
 monitor.
 
 
@@ -63,9 +63,9 @@ sounds better than <i>Normalized Scaling Factor</i>.
 
 
 Each map cell is processed individually. First, the working
 Each map cell is processed individually. First, the working
 color is set to the color of the corresponding cell in the
 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
 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
 should have an appropriate gray-scale color table
 associated with it. You can ensure this by using the color
 associated with it. You can ensure this by using the color
 manipulation capabilities of
 manipulation capabilities of
@@ -73,7 +73,7 @@ manipulation capabilities of
 
 
 Finally, the color is made somewhat gray-based on the
 Finally, the color is made somewhat gray-based on the
 <em>red</em> intensity of that cell in 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.
 should have a gray-scale color table associated with it.
 
 
 <h2>NOTES</h2>
 <h2>NOTES</h2>
@@ -104,13 +104,13 @@ program <em><a href="r.his.html">r.his</a></em>.
 
 
 
 
 <h2>EXAMPLE</h2>
 <h2>EXAMPLE</h2>
-<h3>Spearfish dataset</h3>
 
 
 <div class="code"><pre>
 <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.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>
 </pre></div>
 
 
 <h2>SEE ALSO</h2>
 <h2>SEE ALSO</h2>
@@ -119,6 +119,7 @@ d.his h=elevation.dem i=elev.shad_relf brighten=50
 <a href="d.colortable.html">d.colortable</a>,
 <a href="d.colortable.html">d.colortable</a>,
 <a href="d.frame.html">d.frame</a>,
 <a href="d.frame.html">d.frame</a>,
 <a href="d.rgb.html">d.rgb</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.colors.html">r.colors</a>,
 <a href="r.his.html">r.his</a>,
 <a href="r.his.html">r.his</a>,
 <a href="i.his.rgb.html">i.his.rgb</a>,
 <a href="i.his.rgb.html">i.his.rgb</a>,

+ 7 - 7
display/d.his/main.c

@@ -67,29 +67,29 @@ int main(int argc, char **argv)
     G_add_keyword("IHS");
     G_add_keyword("IHS");
     module->description =
     module->description =
 	_("Displays the result obtained by combining "
 	_("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.");
 	  "from user-specified input raster map layers.");
 
 
     opt_h = G_define_option();
     opt_h = G_define_option();
-    opt_h->key = "h_map";
+    opt_h->key = "hue";
     opt_h->type = TYPE_STRING;
     opt_h->type = TYPE_STRING;
     opt_h->required = YES;
     opt_h->required = YES;
     opt_h->gisprompt = "old,cell,raster";
     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 = G_define_option();
-    opt_i->key = "i_map";
+    opt_i->key = "intensity";
     opt_i->type = TYPE_STRING;
     opt_i->type = TYPE_STRING;
     opt_i->required = NO;
     opt_i->required = NO;
     opt_i->gisprompt = "old,cell,raster";
     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 = G_define_option();
-    opt_s->key = "s_map";
+    opt_s->key = "saturation";
     opt_s->type = TYPE_STRING;
     opt_s->type = TYPE_STRING;
     opt_s->required = NO;
     opt_s->required = NO;
     opt_s->gisprompt = "old,cell,raster";
     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 = G_define_option();
     brighten->key = "brighten";
     brighten->key = "brighten";

+ 13 - 13
raster/r.his/main.c

@@ -65,51 +65,51 @@ int main(int argc, char **argv)
     G_add_keyword("HIS");
     G_add_keyword("HIS");
     G_add_keyword("IHS");
     G_add_keyword("IHS");
     module->description =
     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) "
 	  "combining hue, intensity and saturation (HIS) "
 	  "values from user-specified input raster map layers.");
 	  "values from user-specified input raster map layers.");
 
 
     opt_h = G_define_option();
     opt_h = G_define_option();
-    opt_h->key = "h_map";
+    opt_h->key = "hue";
     opt_h->type = TYPE_STRING;
     opt_h->type = TYPE_STRING;
     opt_h->required = YES;
     opt_h->required = YES;
     opt_h->gisprompt = "old,cell,raster";
     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 = G_define_option();
-    opt_i->key = "i_map";
+    opt_i->key = "intensity";
     opt_i->type = TYPE_STRING;
     opt_i->type = TYPE_STRING;
     opt_i->required = NO;
     opt_i->required = NO;
     opt_i->gisprompt = "old,cell,raster";
     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 = G_define_option();
-    opt_s->key = "s_map";
+    opt_s->key = "saturation";
     opt_s->type = TYPE_STRING;
     opt_s->type = TYPE_STRING;
     opt_s->required = NO;
     opt_s->required = NO;
     opt_s->gisprompt = "old,cell,raster";
     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 = G_define_option();
-    opt_r->key = "r_map";
+    opt_r->key = "red";
     opt_r->type = TYPE_STRING;
     opt_r->type = TYPE_STRING;
     opt_r->required = YES;
     opt_r->required = YES;
     opt_r->gisprompt = "new,cell,raster";
     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 = G_define_option();
-    opt_g->key = "g_map";
+    opt_g->key = "green";
     opt_g->type = TYPE_STRING;
     opt_g->type = TYPE_STRING;
     opt_g->required = YES;
     opt_g->required = YES;
     opt_g->gisprompt = "new,cell,raster";
     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 = G_define_option();
-    opt_b->key = "b_map";
+    opt_b->key = "blue";
     opt_b->type = TYPE_STRING;
     opt_b->type = TYPE_STRING;
     opt_b->required = YES;
     opt_b->required = YES;
     opt_b->gisprompt = "new,cell,raster";
     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 = G_define_flag();
     nulldraw->key = 'n';
     nulldraw->key = 'n';

+ 21 - 11
raster/r.his/r.his.html

@@ -41,16 +41,16 @@ the valleys.
 
 
 Each map cell is processed individually. First, the working
 Each map cell is processed individually. First, the working
 color is set to the color of the corresponding cell in the
 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
 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
 should have an appropriate gray-scale color table
 associated with it. You can ensure this by using the color
 associated with it. You can ensure this by using the color
 manipulation capabilities of
 manipulation capabilities of
 <em><a href="r.colors.html">r.colors</a></em>.
 <em><a href="r.colors.html">r.colors</a></em>.
 Finally, the color is made somewhat gray-based on the
 Finally, the color is made somewhat gray-based on the
 <i>red</i> intensity of that cell in 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.
 should have a gray-scale color table associated with it.
 
 
 <h2>NOTES</h2>
 <h2>NOTES</h2>
@@ -88,18 +88,27 @@ program <em><a href="d.his.html">d.his</a></em>.
 
 
 <h2>EXAMPLES</h2>
 <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>
 <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>
 </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>
 <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>
 </pre></div>
 
 
 
 
@@ -113,6 +122,7 @@ d.rgb red=esr.r green=esr.g blue=esr.b
 <a href="r.colors.html">r.colors</a>,
 <a href="r.colors.html">r.colors</a>,
 <a href="r.composite.html">r.composite</a>,
 <a href="r.composite.html">r.composite</a>,
 <a href="r.mapcalc.html">r.mapcalc</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.his.rgb.html">i.his.rgb</a>,
 <a href="i.rgb.his.html">i.rgb.his</a>
 <a href="i.rgb.his.html">i.rgb.his</a>
 </em>
 </em>