[GRASS-dev] [GRASS GIS] #89: d.legend: option to get info from stdin instead of raster

Glynn Clements glynn at gclements.plus.com
Wed Mar 12 01:33:05 EDT 2008

GRASS GIS wrote:

> #89: d.legend: option to get info from stdin instead of raster
> -------------------------+--------------------------------------------------
>  Reporter:  hamish       |       Owner:  grass-dev at lists.osgeo.org
>      Type:  enhancement  |      Status:  new                      
>  Priority:  minor        |   Milestone:  6.4.0                    
> Component:  default      |     Version:  unspecified              
>  Keywords:               |  
> -------------------------+--------------------------------------------------
>  this was code wish # 391 over on the old gforge tracker. moving it here.
>  http://wald.intevation.org/tracker/index.php?func=detail&aid=391&group_id=21&atid=188
>  Hamish
>  ----
>  Hi,
>  It would be nice if d.legend could look for "map=-" and if so take legend
>  cat and color info from stdin. That way vector maps and custom legends
>  could be made without resorting to tricks like making a dummy raster file
>  to hold
>  that info.  [see v.colors addon script]

The basic idea is reasonable enough, but:

1. The map= option shouldn't be (ab)used for that purpose. There
should be separate options instead. Apart from anything else, you
either have to change map->gisprompt to allow something which isn't a
map (which means that you don't get the map browser in the GUI), or
you leave map->gisprompt alone but then can't use that feature from
the GUI.

2. Using stdin is generally a bad idea. It doesn't work with the GUI. 
The module needs to copy the data to a temporary file so that d.save,
d.redraw etc work.

Glynn Clements <glynn at gclements.plus.com>

More information about the grass-dev mailing list