فهرست منبع

r.relief, r.shade, d.shade: rename from r.shaded.relief, r.shadedmap and d.shadedmap (also improve keywords, see also and examples, add r.shade to toolboxes)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@63305 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras 10 سال پیش
والد
کامیت
4f16df79ce

+ 2 - 2
display/d.his/d.his.html

@@ -107,7 +107,7 @@ program <em><a href="r.his.html">r.his</a></em>.
 
 <div class="code"><pre>
 g.region rast=elevation
-r.shaded.relief input=elevation output=elevation_shaded_relief
+r.relief input=elevation output=elevation_shaded_relief
 
 d.mon wx0
 d.his hue=elevation intensity=elevation_shaded_relief brighten=50
@@ -119,7 +119,7 @@ d.his hue=elevation intensity=elevation_shaded_relief brighten=50
 <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="d.shade.html">d.shade</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>,

+ 3 - 2
gui/wxpython/docs/wxGUI.html

@@ -168,8 +168,9 @@ d.vect, or d.grid, for example).
       <dt><img src="icons/layer-shaded-relief-add.png" alt="icon">&nbsp;
 	<em>Add shaded relief raster map layer </em></dt>
       <dd>Adds shaded relief raster map layer,
-	see <em><a href="d.shadedmap.html">d.shadedmap</a></em>.</dd>
-      
+      see <em><a href="r.relief.html">r.relief</a></em> and
+      <em><a href="d.shade.html">d.shade</a></em>.</dd>
+
       <dt><img src="icons/layer-aspect-arrow-add.png" alt="icon">&nbsp;
 	<em>Add raster arrows layer</em></dt>
       <dd>Adds map of raster cells with directional arrows drawn. Arrow

+ 5 - 2
gui/wxpython/xml/toolboxes.xml

@@ -785,8 +785,11 @@
         <label>Least cost route or flow</label>
       </module-item>
       <separator/>
-      <module-item name="r.shaded.relief">
-        <label>Shaded relief</label>
+      <module-item name="r.relief">
+        <label>Compute shaded relief</label>
+      </module-item>
+      <module-item name="r.shade">
+        <label>Apply shade to raster</label>
       </module-item>
       <separator/>
       <module-item name="r.slope.aspect">

+ 1 - 1
raster/Makefile

@@ -85,7 +85,7 @@ SUBDIRS = \
 	r.series \
 	r.series.accumulate \
 	r.series.interp \
-	r.shaded.relief \
+	r.relief \
 	r.sim \
 	r.slope.aspect \
 	r.solute.transport \

+ 2 - 2
raster/r.his/r.his.html

@@ -93,7 +93,7 @@ First, create shaded relief and show it.
 
 <div class="code"><pre>
 g.region rast=elevation
-r.shaded.relief input=elevation output=elevation_shaded_relief
+r.relief input=elevation output=elevation_shaded_relief
 
 d.mon wx0
 d.his hue=elevation intensity=elevation_shaded_relief brighten=50
@@ -122,7 +122,7 @@ d.rgb red=shadedmap_r green=shadedmap_g blue=shadedmap_b
 <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="r.shade.html">r.shade</a>,
 <a href="i.his.rgb.html">i.his.rgb</a>,
 <a href="i.rgb.his.html">i.rgb.his</a>
 </em>

+ 3 - 3
raster/r.lake/r.lake.html

@@ -92,10 +92,10 @@ g.region rast=elev_lid792_1m -p
 r.lake elev_lid792_1m coordinates=638759.3,220264.1 water_level=113.4 lake=flooding
 
 # draw resulting lake map over shaded terrain map
-r.shaded.relief elev_lid792_1m
-d.rast elev_lid792_1m.shade
+r.relief input=elev_lid792_1m output=elev_lid792_1m_shade
+d.rast elev_lid792_1m_shade
 d.rast -o flooding
-d.vect streets_wake 
+d.vect streets_wake
 d.vect bldg_cmcl_pol type=area
 </pre></div>
 

+ 1 - 1
raster/r.shaded.relief/Makefile

@@ -1,6 +1,6 @@
 MODULE_TOPDIR = ../..
 
-PGM = r.shaded.relief
+PGM = r.relief
 
 LIBES = $(RASTERLIB) $(GISLIB) $(MATHLIB)
 DEPENDENCIES = $(RASTERDEP) $(GISDEP)

+ 4 - 2
raster/r.shaded.relief/main.c

@@ -1,7 +1,7 @@
 
 /****************************************************************************
  *
- * MODULE:       r.shaded.relief
+ * MODULE:       r.relief
  * AUTHOR(S):	CERL
  *               parameters standardized: Markus Neteler, 2008
  *               updates: Michael Barton, 2004
@@ -106,7 +106,9 @@ int main(int argc, char *argv[])
     module = G_define_module();
     G_add_keyword(_("raster"));
     G_add_keyword(_("elevation"));
+    G_add_keyword(_("relief"));
     G_add_keyword(_("terrain"));
+    G_add_keyword(_("hillshade"));
     module->label = _("Creates shaded relief map from an elevation map (DEM).");
     
     parm.elevation = G_define_standard_option(G_OPT_R_INPUT);
@@ -459,7 +461,7 @@ int main(int argc, char *argv[])
 
     /* writing history file */
     Rast_short_history(sr_name, "raster", &hist);
-    Rast_append_format_history(&hist, "r.shaded.relief settings:");
+    Rast_append_format_history(&hist, "r.relief settings:");
     Rast_append_format_history(&hist,
                                "altitude=%f  azimuth=%f zmult=%f  scale=%f",
 			       altitude * radians_to_degrees,

+ 22 - 10
raster/r.shaded.relief/r.shaded.relief.html

@@ -1,6 +1,6 @@
 <h2>DESCRIPTION</h2>
 
-<em>r.shaded.relief</em> creates a raster shaded relief map based on 
+<em>r.relief</em> creates a raster shaded relief map based on 
 current resolution settings and on sun altitude, azimuth, and 
 z-exaggeration values entered by the user. If no output shademap 
 name is given, the new shaded relief map is named <em>&lt;input_map
@@ -37,14 +37,14 @@ the <b>scale</b> parameter.
 
 </ol>
 
-<p><em>r.shaded.relief</em> assigns a grey-scale color table to the new 
+<p><em>r.relief</em> assigns a grey-scale color table to the new 
 shaded relief map.
 
 <h2>NOTES</h2>
 
 To visually improve the result of shade maps from low resolution elevation
 models, use <em>r.resamp.interp</em> with bilinear or bicubic method to
-resample the DEM at higher resolution. <em>r.shaded.relief</em> is then
+resample the DEM at higher resolution. <em>r.relief</em> is then
 run on the resampled DEM.
 
 <h2>EXAMPLES</h2>
@@ -54,31 +54,43 @@ dataset location is used to hillshade the elevation map:
 
 <div class="code"><pre>
 g.region rast=elevation -p
-r.shaded.relief input=elevation output=elevation.shaded
+r.relief input=elevation output=elevation_shade
 </pre></div>
 
 <center>
-<img src="r_shaded_relief.png" alt="GRASS r.shaded.relief result (subset)" border=0>
+<img src="r_relief.png" alt="GRASS r.relief result (subset)" border=0>
 <br>
-<i>r.shaded.relief: shaded elevation map (subset)</i>
+<i>r.relief: shaded elevation map (subset)</i>
 </center>
 
+Color can be added later using <em><a href="r.shade.html">r.shade</a></em>:
+<div class="code"><pre>
+r.shade reliefmap=elevation_shade drapemap=elevation output=elevation_shaded
+</pre></div>
+
 <p>In Latitude-Longitude locations (or other non-metric locations), the
 <em>scale</em> factor has to be used:
 
 <div class="code"><pre>
 # Latitude-Longitude example
-r.shaded.relief input=srtm output=srtm.shaded scale=111120
+r.relief input=srtm output=srtm_shaded scale=111120
 </pre></div>
 
 <h2>SEE ALSO</h2>
 
-<p><!-- RGB version not ported to GRASS 6 (why?):
+<p>
+<!--
+  RGB version not ported to GRASS 6 (why?):
   <em><a href="shade.clr.sh.html">shade.clr.sh</a></em><br>
- -->
+  d.shade and r.shade probably cover most of the shade.clr functionality
+  however, it is not possible to create shade+color map in one step
+  delete this note when it is solved or if it is not considered as an issue
+-->
 <em>
+<a href="d.shade.html">d.shade</a>,
 <a href="d.his.html">d.his</a>,
 <a href="g.region.html">g.region</a>,
+<a href="r.shade.html">r.shade</a>,
 <a href="r.blend.html">r.blend</a>,
 <a href="r.colors.html">r.colors</a>,
 <a href="r.mapcalc.html">r.mapcalc</a>,
@@ -89,6 +101,6 @@ r.shaded.relief input=srtm output=srtm.shaded scale=111120
 
 Jim Westervelt, U.S. Army Construction Engineering Research Laboratory
 <br>
-Markus Metz: GRASS GIS 7- enhanced fast C version of r.shaded.relief
+Markus Metz: Enhanced fast C version of r.relief for GRASS GIS 7
 
 <p><i>Last changed: $Date$</i>

raster/r.shaded.relief/r_shaded_relief.png → raster/r.relief/r_relief.png


+ 2 - 2
scripts/Makefile

@@ -8,7 +8,7 @@ SUBDIRS = \
 	d.rast.edit \
 	d.rast.leg \
 	d.redraw \
-	d.shadedmap \
+	d.shade \
 	d.vect.thematic \
 	d.what.rast \
 	d.what.vect \
@@ -43,7 +43,7 @@ SUBDIRS = \
 	r.plane \
 	r.reclass.area \
 	r.rgb \
-	r.shadedmap \
+	r.shade \
 	r.tileset \
 	r.unpack \
 	r3.in.xyz \

+ 1 - 1
scripts/d.shadedmap/Makefile

@@ -1,6 +1,6 @@
 MODULE_TOPDIR = ../..
 
-PGM = d.shadedmap
+PGM = d.shade
 
 include $(MODULE_TOPDIR)/include/Make/Script.make
 

+ 10 - 10
scripts/d.shadedmap/d.shadedmap.html

@@ -1,6 +1,6 @@
 <h2>DESCRIPTION</h2>
 
-<em>d.shadedmap</em> will drape a color raster map over a shaded relief map.
+<em>d.shade</em> will drape a color raster map over a shaded relief map.
 In place of shaded relief, any raster map can be used including aspect or slope.
 The color raster map is usually an elevation raster map with colorful color
 table (as opposed to gray scale color table). However, any raster map can be
@@ -15,13 +15,13 @@ the color raster map, this module gives result with more saturated colors.
 <p>
 The input for this module can be created for example using
 <a href="r.slope.aspect.html">r.slope.aspect</a> or
-<a href="r.shaded.relief.html">r.shaded.relief</a><br>.
+<a href="r.relief.html">r.relief</a><br>.
 
 
 <h2>NOTES</h2>
 
 Refer to the <em><a href="d.his.html">d.his</a></em> help page for more details;
-<em>d.shadedmap</em> is simply a frontend to that module.
+<em>d.shade</em> is simply a frontend to that module.
 
 
 <h2>EXAMPLES</h2>
@@ -32,14 +32,14 @@ dataset location is used to hillshade the <tt>elevation</tt> map:
 <div class="code"><pre>
 g.region rast=aspect -p
 d.mon wx0
-d.shadedmap reliefmap=aspect drapemap=elevation
+d.shade reliefmap=aspect drapemap=elevation
 </pre></div>
 
 <!--
 image generated using the example above
 display region: g.region -a n=227228 s=220895 w=631362 e=641170
-d.out.file dshadedmap.png
-optipng -o5 dshadedmap.png
+d.out.file dshade.png
+optipng -o5 dshade.png
 -->
 <center>
 <img src="dshadedmap.png" alt="Elevation with aspect shades">
@@ -59,10 +59,10 @@ and used to create a colorized hillshade:
 
 <div class="code"><pre>
 g.region rast=elevation
-r.shaded.relief input=elevation output=elevation_shaded_relief
+r.relief input=elevation output=elevation_shaded_relief
 
 d.mon wx1
-d.shadedmap reliefmap=elevation_shaded_relief drapemap=elevation
+d.shade reliefmap=elevation_shaded_relief drapemap=elevation
 </pre></div>
 
 Interesting visualizations can be created using different color tables for
@@ -74,9 +74,9 @@ elevation raster map, for example using <tt>haxby</tt> color table.
 <em>
 <a href="d.his.html">d.his</a>,
 <a href="g.pnmcomp.html">g.pnmcomp</a>,
-<a href="r.shadedmap.html">r.shadedmap</a>,
+<a href="r.shade.html">r.shade</a>,
 <a href="r.slope.aspect.html">r.slope.aspect</a>,
-<a href="r.shaded.relief.html">r.shaded.relief</a><br>
+<a href="r.relief.html">r.relief</a><br>
 <a href="wxGUI.nviz.html">wxGUI 3D viewer (NVIZ)</a>
 </em>
 

+ 1 - 1
scripts/d.shadedmap/d.shadedmap.py

@@ -2,7 +2,7 @@
 
 ############################################################################
 #
-# MODULE:        d.shadedmap
+# MODULE:        d.shade
 # AUTHOR(S):        Unknown; updated to GRASS 5.7 by Michael Barton
 #                Converted to Python by Glynn Clements
 # PURPOSE:        Uses d.his to drape a color raster over a shaded relief map

scripts/d.shadedmap/dshadedmap.png → scripts/d.shade/dshade.png


+ 1 - 1
scripts/r.shadedmap/Makefile

@@ -1,6 +1,6 @@
 MODULE_TOPDIR = ../..
 
-PGM = r.shadedmap
+PGM = r.shade
 
 include $(MODULE_TOPDIR)/include/Make/Script.make
 

+ 15 - 15
scripts/r.shadedmap/r.shadedmap.html

@@ -1,6 +1,6 @@
 <h2>DESCRIPTION</h2>
 
-<em>r.shadedmap</em> will drape a color raster map over a shaded relief map.
+<em>r.shade</em> will drape a color raster map over a shaded relief map.
 In place of shaded relief, any raster map can be used including aspect or slope.
 The color raster map is usually an elevation raster map with colorful color
 table (as opposed to gray scale color table). However, any raster map can be
@@ -14,7 +14,7 @@ the color raster map, this module gives result with more saturated colors.
 <p>
 The input for this module can be created for example using
 <a href="r.slope.aspect.html">r.slope.aspect</a> or
-<a href="r.shaded.relief.html">r.shaded.relief</a><br>.
+<a href="r.relief.html">r.relief</a><br>.
 
 <p>
 NULL values are propagated by default, so if any of the two input rasters
@@ -29,13 +29,13 @@ by the given color.
 <h2>NOTES</h2>
 
 Refer to the <a href="r.his.html">r.his</a> help page for more details;
-<em>r.shadedmap</em> is a frontend to that module with addition of
+<em>r.shade</em> is a frontend to that module with addition of
 brightness support similar to one provided by
-<em><a href="d.shadedmap.html">d.shadedmap</a></em>.
+<em><a href="d.shade.html">d.shade</a></em>.
 However, note that the brightness is not implemenented in the same way as for
-<em><a href="d.shadedmap.html">d.shadedmap</a></em> and the results might
+<em><a href="d.shade.html">d.shade</a></em> and the results might
 be different.
-<em>r.shadedmap</em> is using method described in <a href="r.his.html">r.his</a>
+<em>r.shade</em> is using method described in <a href="r.his.html">r.his</a>
 manual page.
 
 
@@ -46,7 +46,7 @@ dataset location is used to hillshade the <tt>elevation</tt> map:
 
 <div class="code"><pre>
 g.region rast=aspect -p
-r.shadedmap reliefmap=aspect drapemap=elevation output=elevation_aspect_shaded
+r.shade reliefmap=aspect drapemap=elevation output=elevation_aspect_shaded
 
 d.mon wx0
 d.rast elevation_aspect_shaded
@@ -58,9 +58,9 @@ raster map for later use:
 
 <div class="code"><pre>
 g.region rast=elevation
-r.shaded.relief input=elevation output=elevation_shaded_relief
+r.relief input=elevation output=elevation_shaded_relief
 
-r.shadedmap reliefmap=elevation_shaded_relief drapemap=elevation \
+r.shade reliefmap=elevation_shaded_relief drapemap=elevation \
     output=elevation_relief_shaded
 
 d.mon wx1
@@ -73,13 +73,13 @@ elevation raster map, for example using <tt>haxby</tt> color table.
 <!--
 image generated using the example above
 display region: g.region -a n=227228 s=220895 w=631362 e=641170
-d.out.file rshadedmap.png
-optipng -o5 rshadedmap.png
+d.out.file rshade.png
+optipng -o5 rshade.png
 Note: The image is darker in the GNOME image viewer than the one in the map
 display. However, Firefox shows the same colors.
 -->
 <center>
-<img src="rshadedmap.png" alt="Elevation with shaded relief (hillshade)">
+<img src="rshade.png" alt="Elevation with shaded relief (hillshade)">
 <p>
 Figure: A detail of raster created by applying shading effect of shaded relief
 (hillshade) to elevation raster map from North Carolina dataset elevation map
@@ -91,10 +91,10 @@ Figure: A detail of raster created by applying shading effect of shaded relief
 <em>
 <a href="r.his.html">r.his</a>,
 <a href="d.his.html">d.his</a>,
-<a href="d.shadedmap.html">d.shadedmap</a>,
+<a href="d.shade.html">d.shade</a>,
 <a href="g.pnmcomp.html">g.pnmcomp</a>,
 <a href="r.slope.aspect.html">r.slope.aspect</a>,
-<a href="r.shaded.relief.html">r.shaded.relief</a>
+<a href="r.relief.html">r.relief</a>
 </em>
 
 
@@ -102,7 +102,7 @@ Figure: A detail of raster created by applying shading effect of shaded relief
 
 Hamish Bowman<br>
 Vaclav Petras, <a href="http://geospatial.ncsu.edu/osgeorel/">NCSU OSGeoREL</a><br>
-Inspired by <em><a href="d.shadedmap.html">d.shadedmap</a></em> and
+Inspired by <em><a href="d.shade.html">d.shade</a></em> and
 manual for <em><a href="r.his.html">r.his</a></em>.
 
 <p>

+ 5 - 5
scripts/r.shadedmap/r.shadedmap.py

@@ -2,10 +2,10 @@
 #
 ############################################################################
 #
-# MODULE:        r.shadedmap
+# MODULE:        r.shade
 # AUTHOR(S):     Hamish Bowman
 #                Vaclav Petras <wenzeslaus gmail com>
-#                Inspired by d.shadedmap
+#                Inspired by d.shade (formerly d.shadedmap)
 # PURPOSE:       Uses r.his to drape a color raster over a shaded relief map
 # COPYRIGHT:     (C) 2014 by Hamish Bowman, and the GRASS Development Team
 #
@@ -91,7 +91,7 @@ def main():
 
     to_remove = []
     try:
-        unique_name = 'tmp__rshadedmap_%d' % os.getpid()
+        unique_name = 'tmp__rshade_%d' % os.getpid()
         tmp_base = '%s_drape' % unique_name
         tmp_r = tmp_base + '.r'
         tmp_g = tmp_base + '.g'
@@ -99,9 +99,9 @@ def main():
 
         if brighten:
             # steps taken from r.his manual page
-            # how much they are similar with d.shadedmap/d.his is unknown
+            # how much they are similar with d.shade/d.his is unknown
             # perhaps even without brightness, there can be some differences
-            # comparing to d.shadedmap
+            # comparing to d.shade
             relief_map_tmp = '%s_relief' % unique_name
             # convert [-99, -99] to [0.01, 1.99]
             brighten = 1 + brighten / 100.

scripts/r.shadedmap/rshadedmap.png → scripts/r.shade/rshade.png