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

GRASS GIS trac at osgeo.org
Thu Sep 19 20:09:44 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                |  
-------------------------------+--------------------------------------------
 It is not possible to show a legend for 3D raster map.

 I have a patch to add support for 3D rasters into `d.legend` module. It is
 created in the same way as `r3.colors`, i.e. main.c is turned to the
 normal C file and there are two new C files with `int main` functions
 which calls the same function but with different parameter.

 I used the names `d.legend` and `d.rast3d.legend`.

 I'm not sure about non-floating point 3D rasters. There are no integers
 but categories are supported? There is actually no documentation about
 data types in 3D (see
 [http://grass.osgeo.org/grass70/manuals/raster3dintro.html user] and
 [http://grass.osgeo.org/programming7/raster3dlib.html programming]
 manuals).

 The documentation and some comments are still missing but I will add them.
 Some basic test would be nice too. The wxGUI support for this will be
 added later.

 To test the legend use:
 {{{
 # generate data
 r3.mapcalc "test_1 = "
 # set some color table
 r3.colors map=test_1 color=elevation
 # use non-gui monitor
 d.mon png out=legend.png
 # try some legends
 d.rast3.legend map=test_1 at=10,50,10,20
 d.rast3.legend map=test_1 at=10,50,30,40 use=10,20,50
 }}}

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



More information about the grass-dev mailing list