[GRASS-user] Re: [GRASSLIST:1184] how to keep same color table for a bunch of rasters?

Glynn Clements glynn at gclements.plus.com
Thu Sep 7 22:41:51 EDT 2006


Vishal Mehta wrote:

> Now before i look into animation, i could use your advice on the following:
> step1 :  I need to automate (since there are 100 maps), conversion of
>   each map - with legend (appropriately sized; right now with d.rast.leg, or
> d.legend its too big) and preferably also a title  -  to a png.
> Normally i've just done d.rast mapname, then exported as picture using the
> GUI..
> 
> Can you suggest a way to automate the above?

	export GRASS_TRUECOLOR=TRUE
	d.mon start=PNG
	for map in map1 map2 ... ; do
	    d.erase
	    d.rast $map
	    d.legend $map
	    mv map.png out-$map.png
	done

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-user mailing list