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

Michael Barton michael.barton at asu.edu
Fri May 4 11:57:08 EDT 2007




On 5/3/07 11:20 PM, "grass-coder at wald.intevation.org"
<grass-coder at wald.intevation.org> wrote:

> 
> Initial Comment:
> 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.
> 
> If data is fed from stdin (signaled by map=-) create categorical legend
> using that data. Data format: "cat|label|color"
> 
> e.g.
> 
> d.legend -m map="-" <<EOF
> 1|Main Street|255:0:0
> 2|Elm Street|0:255:0
> 3|Old Coach Road|0:0:255
> EOF

I'm overall in favor of d.legend being able to build a legend from such
output. It would simplify matters for making thematic map and thematic chart
legends and might even work for making vector legends.

However, the interactive format shown above wouldn't work in a scriptable
GUI setting. I'm also having trouble trying to envision how it *could* work
in such a setting in order to make an alternative suggestion.

d.vect.chart [flag to send legend output to stdout] | d.legend map=- ????

Michael

> 
> 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:
>  http://thread.gmane.org/gmane.comp.gis.grass.devel/19852/focus=19952
> 
> 
> Hamish
> 
> 
> ----------------------------------------------------------------------
> 
> You can respond by visiting:
> http://wald.intevation.org/tracker/?func=detail&atid=188&aid=391&group_id=21
> 
> 

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton





More information about the grass-dev mailing list