[GRASS-dev] [grass-code R][391] d.legend: option to get info from stdin instead of raster

grass-coder at wald.intevation.org grass-coder at wald.intevation.org
Fri May 4 02:20:31 EDT 2007

code R item #391, was opened at 2007-05-04 18:20
Status: Open
Priority: 3
Submitted By: Hamish Bowman (hamish)
Assigned to: Nobody (None)
Summary: d.legend: option to get info from stdin instead of raster 
Issue status: None
GRASS component: display
Operating system: all
Operating system version: 

Initial Comment:

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.

If data is fed from stdin (signaled by map=-) create categorical legend
using that data. Data format: "cat|label|color"


d.legend -m map="-" <<EOF
1|Main Street|255:0:0
2|Elm Street|0:255:0
3|Old Coach Road|0:0:255

In this way d.legend could work as a system module by the GUI instead of
a user module, and be useful for non-raster tasks too.

see expanded thread on the -dev mailing list:



You can respond by visiting: 

More information about the grass-dev mailing list