Opened 16 years ago

Last modified 5 years ago

#89 new enhancement

d.legend: option to get info from stdin instead of raster

Reported by: hamish Owned by: grass-dev@…
Priority: minor Milestone: 8.0.0
Component: Display Version: unspecified
Keywords: d.legend d.legend.vect Cc:
CPU: Unspecified Platform: Unspecified


this was code wish # 391 over on the old gforge tracker. moving it here.



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]

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:


Change History (2)

comment:1 by hamish, 15 years ago

Component: defaultDisplay
CPU: Unspecified
Keywords: d.legend added
Platform: Unspecified

comment:2 by wenzeslaus, 5 years ago

Keywords: d.legend.vect added

This would be similar to what G7:d.legend.vect supports (input option).

Note: See TracTickets for help on using tickets.