[GRASS-dev] [GRASS GIS] #2083: Add 3D raster (volume) support to d.legend

GRASS GIS trac at osgeo.org
Thu Sep 19 21:30:21 PDT 2013

#2083: Add 3D raster (volume) support to d.legend
 Reporter:  wenzeslaus          |       Owner:  grass-dev@…              
     Type:  enhancement         |      Status:  new                      
 Priority:  normal              |   Milestone:  7.0.0                    
Component:  Display             |     Version:  svn-trunk                
 Keywords:  d.legend, raster3d  |    Platform:  All                      
      Cpu:  All                 |  
Changes (by hamish):

  * keywords:  d.legend raster3d => d.legend, raster3d



 I don't think this needs a separate module, rather we could add a -3 flag
 to the main d.legend module to tell it that it should expect a 3d raster
 for the map name. Or if the parser can't be convinced to deal with that,
 add a new rast3d= option and check that one or the other has been given
 (sort of like g.copy et al.). --> At some point I'd like to have d.legend
 support vector maps and arbitrary color rules text files too.

 A simple/quick wrapper script way for a linear color scale is to make a
 dummy 10x10 cell raster map with both the max and min values from r3.info
 put in to some cells with r.mapcalc. Then use d.legend with the dummy 2D
 raster map as the input not the real 3D raster cube. fwiw this is why the
 v.colors shell script for G6 allows to make a dummy raster map with the
 placeholder= option.

 see also the r.stack addon module for G6, which was written to allow
 'r.colors -e' to work with a series of input maps, in the original case a
 3D raster cube split up into individual depth horizons, but a constant
 colorbar for all steps in a time series is another common reason to use


 ps- trac wants keywords to be comma separated

Ticket URL: <https://trac.osgeo.org/grass/ticket/2083#comment:2>
GRASS GIS <http://grass.osgeo.org>

More information about the grass-dev mailing list