[GRASS-SVN] r63741 - in grass/trunk: gui/wxpython/core raster/r.relief raster/r.surf.fractal raster/r.texture raster/r.watershed/front scripts/d.shade scripts/r.shade

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Dec 24 19:14:35 PST 2014


Author: wenzeslaus
Date: 2014-12-24 19:14:35 -0800 (Wed, 24 Dec 2014)
New Revision: 63741

Modified:
   grass/trunk/gui/wxpython/core/utils.py
   grass/trunk/raster/r.relief/r.relief.html
   grass/trunk/raster/r.surf.fractal/r.surf.fractal.html
   grass/trunk/raster/r.texture/r.texture.html
   grass/trunk/raster/r.watershed/front/r.watershed.html
   grass/trunk/scripts/d.shade/d.shade.html
   grass/trunk/scripts/d.shade/d.shade.py
   grass/trunk/scripts/r.shade/r.shade.html
   grass/trunk/scripts/r.shade/r.shade.py
Log:
d.shade and r.shade: replace 'reliefmap' by more general 'shade' and 'drapemap' by more straight forward 'color'

 * this also follows the practice of not putting map when it is not necessary and not merging the words together
 * the change in GUI makes it work as before (probably also for d.his and r.his) but a strange or wrong behavior remains when the guessing of layer name fails (in case of other commands)
 * not changing variables in code, these might be changed during some refactoring
 * not changing descriptions and manual and leaving 'drapping', examples are already there and no better idea for description now
 * not adding to renamed_options because also the modules were renamed and there is not mechanism for this, so changes in users' code is necessary anyway


Modified: grass/trunk/gui/wxpython/core/utils.py
===================================================================
--- grass/trunk/gui/wxpython/core/utils.py	2014-12-25 02:55:49 UTC (rev 63740)
+++ grass/trunk/gui/wxpython/core/utils.py	2014-12-25 03:14:35 UTC (rev 63741)
@@ -123,11 +123,12 @@
             if p == param:
                 params = [(idx, p, v)]
                 break
-            
+
+            # this does not use types, just some (incomplete subset of?) names
             if p in ('map', 'input', 'layer',
                      'red', 'blue', 'green',
-                     'h_map', 's_map', 'i_map',
-                     'reliefmap', 'labels'):
+                     'hue', 'saturation', 'intensity',
+                     'shade', 'labels'):
                 params.append((idx, p, v))
 
         if len(params) < 1:

Modified: grass/trunk/raster/r.relief/r.relief.html
===================================================================
--- grass/trunk/raster/r.relief/r.relief.html	2014-12-25 02:55:49 UTC (rev 63740)
+++ grass/trunk/raster/r.relief/r.relief.html	2014-12-25 03:14:35 UTC (rev 63741)
@@ -65,7 +65,7 @@
 
 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
+r.shade shade=elevation_shade color=elevation output=elevation_shaded
 </pre></div>
 
 <p>In Latitude-Longitude locations (or other non-metric locations), the

Modified: grass/trunk/raster/r.surf.fractal/r.surf.fractal.html
===================================================================
--- grass/trunk/raster/r.surf.fractal/r.surf.fractal.html	2014-12-25 02:55:49 UTC (rev 63740)
+++ grass/trunk/raster/r.surf.fractal/r.surf.fractal.html	2014-12-25 03:14:35 UTC (rev 63741)
@@ -27,7 +27,7 @@
 r.relief input=fractals output=fractals_shade
 
 d.mon wx0
-d.shade relief=fractals_shade drape=fractals b=50
+d.shade shade=fractals_shade color=fractals b=50
 </pre></div>
 
 <center>

Modified: grass/trunk/raster/r.texture/r.texture.html
===================================================================
--- grass/trunk/raster/r.texture/r.texture.html	2014-12-25 02:55:49 UTC (rev 63740)
+++ grass/trunk/raster/r.texture/r.texture.html	2014-12-25 03:14:35 UTC (rev 63741)
@@ -112,7 +112,7 @@
 r.texture ortho_2001_t792_1m.greylevel prefix=ortho_texture method=asm -s 
 # display
 g.region n=221461 s=221094 w=638279 e=638694
-d.shade drape=ortho_texture_ASM_0 rel=ortho_2001_t792_1m
+d.shade color=ortho_texture_ASM_0 shade=ortho_2001_t792_1m
 </pre></div>
 
 This calculates four maps (requested texture at four orientations):

Modified: grass/trunk/raster/r.watershed/front/r.watershed.html
===================================================================
--- grass/trunk/raster/r.watershed/front/r.watershed.html	2014-12-25 02:55:49 UTC (rev 63740)
+++ grass/trunk/raster/r.watershed/front/r.watershed.html	2014-12-25 03:14:35 UTC (rev 63741)
@@ -450,7 +450,7 @@
 Display output in a nice way
 <div class="code"><pre>
   r.relief map=elevation.dem
-  d.shade rel=elevation.dem.shade drape=rwater.basin bright=40
+  d.shade shade=elevation.dem.shade color=rwater.basin bright=40
   d.vect rwater_course color=orange
 </pre></div>
 

Modified: grass/trunk/scripts/d.shade/d.shade.html
===================================================================
--- grass/trunk/scripts/d.shade/d.shade.html	2014-12-25 02:55:49 UTC (rev 63740)
+++ grass/trunk/scripts/d.shade/d.shade.html	2014-12-25 03:14:35 UTC (rev 63741)
@@ -32,7 +32,7 @@
 <div class="code"><pre>
 g.region raster=aspect -p
 d.mon wx0
-d.shade reliefmap=aspect drapemap=elevation
+d.shade shade=aspect color=elevation
 </pre></div>
 
 <!--
@@ -62,7 +62,7 @@
 r.relief input=elevation output=elevation_shaded_relief
 
 d.mon wx1
-d.shade reliefmap=elevation_shaded_relief drapemap=elevation
+d.shade shade=elevation_shaded_relief color=elevation
 </pre></div>
 
 Interesting visualizations can be created using different color tables for

Modified: grass/trunk/scripts/d.shade/d.shade.py
===================================================================
--- grass/trunk/scripts/d.shade/d.shade.py	2014-12-25 02:55:49 UTC (rev 63740)
+++ grass/trunk/scripts/d.shade/d.shade.py	2014-12-25 03:14:35 UTC (rev 63741)
@@ -23,11 +23,11 @@
 #% keywords: visualization
 #%end
 #%option G_OPT_R_INPUT
-#% key: reliefmap
+#% key: shade
 #% description: Name of shaded relief or aspect raster map
 #%end
 #%option G_OPT_R_INPUT
-#% key: drapemap
+#% key: color
 #% label: Name of raster to drape over relief raster map
 #% description: Typically, this raster is elevation or other colorful raster
 #%end
@@ -47,8 +47,8 @@
 def main():
     options, unused = gcore.parser()
 
-    drape_map = options['drapemap']
-    relief_map = options['reliefmap']
+    drape_map = options['color']
+    relief_map = options['shade']
     brighten = options['brighten']
 
     try:

Modified: grass/trunk/scripts/r.shade/r.shade.html
===================================================================
--- grass/trunk/scripts/r.shade/r.shade.html	2014-12-25 02:55:49 UTC (rev 63740)
+++ grass/trunk/scripts/r.shade/r.shade.html	2014-12-25 03:14:35 UTC (rev 63741)
@@ -19,8 +19,8 @@
 <p>
 NULL values are propagated by default, so if any of the two input rasters
 contains NULL cell NULL will be also in the output. If <b>-c</b> flag is
-used and cell in <b>drapemap</b> raster is NULL, just <b>reliefmap</b>
-color is used. If cell in <b>reliefmap</b> raster is NULL, shading effect
+used and cell in <b>color</b> raster is NULL, just <b>shade</b>
+color is used. If cell in <b>shade</b> raster is NULL, shading effect
 is not applied and original colors are used. If <b>bgcolor</b> option is
 used, NULL value in any input raster will be in the output replaced
 by the given color.
@@ -46,7 +46,7 @@
 
 <div class="code"><pre>
 g.region raster=aspect -p
-r.shade reliefmap=aspect drapemap=elevation output=elevation_aspect_shaded
+r.shade shade=aspect color=elevation output=elevation_aspect_shaded
 
 d.mon wx0
 d.rast elevation_aspect_shaded
@@ -60,7 +60,7 @@
 g.region raster=elevation
 r.relief input=elevation output=elevation_shaded_relief
 
-r.shade reliefmap=elevation_shaded_relief drapemap=elevation \
+r.shade shade=elevation_shaded_relief color=elevation \
     output=elevation_relief_shaded
 
 d.mon wx1

Modified: grass/trunk/scripts/r.shade/r.shade.py
===================================================================
--- grass/trunk/scripts/r.shade/r.shade.py	2014-12-25 02:55:49 UTC (rev 63740)
+++ grass/trunk/scripts/r.shade/r.shade.py	2014-12-25 03:14:35 UTC (rev 63741)
@@ -24,11 +24,11 @@
 #% keywords: visualization
 #%end
 #%option G_OPT_R_INPUT
-#% key: reliefmap
+#% key: shade
 #% description: Name of shaded relief or aspect raster map
 #%end
 #%option G_OPT_R_INPUT
-#% key: drapemap
+#% key: color
 #% label: Name of raster to drape over relief raster map
 #% description: Typically, this raster is elevation or other colorful raster
 #%end
@@ -77,8 +77,8 @@
 def main():
     options, flags = gcore.parser()
 
-    drape_map = options['drapemap']
-    relief_map = options['reliefmap']
+    drape_map = options['color']
+    relief_map = options['shade']
     brighten = int(options['brighten'])
     output_map = options['output']
     bgcolor = options['bgcolor']



More information about the grass-commit mailing list