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

Vishal Mehta vishalm1975 at gmail.com
Thu Sep 7 03:46:04 EDT 2006


Hi all,
thanks so much- i was able to set all my 100 rainfall maps to one set of
rules, using
# add color rules rainrules.txt to each rainfall map
for MAP in `g.mlist type=rast pat=rain*` ; do
echo "Working on: $MAP"
r.colors map=$MAP color=rules<rules.txt
done

where rainrules.txt was (units are monthly rain in mm*10)
0 gray
100 yellow
1000 green
5000 cyan
10000 blue
20000 violet
32300 red
end

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?

thanks,
vishal


On 9/7/06, Māris Nartišs <maris.gis at gmail.com> wrote:
>
> Hi,
> You mean like this?:
> ## Encode all .png files in directory to out.avi with 15 frames per
> second.
> mencoder "mf://*.png" -mf fps=15 -o out.avi #-ovc here
> ## DivX - libavcodec MPEG 4 (DivX5)
> -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=1800
> ## XviD
> -ovc xvid -xvidencopts bitrate=1024
> ## DivX4
> -ovc divx4 -divx4opts q=5
>
> Uses mplayer's encoder. Choose one of encoding formats and append to end
> of "mencoder" line. Unfortunately only way to know quality settings is by
> encoding, watching result and reendocing with different params.
>
> Example (it's quite old and I don't remeber encoding params):
> http://www.aiknc.lv/1_sm_65_ledus.avi
> (Location: North Vidzeme, Latvia. Content: r.lake mapcalc version in
> action -
> filling Smiltene ice damed lake from seed point) You can see how changes
> lake
> color as it get's deeper.
>
> Vishal Mehta - You could try out to define map's colors using explict
> category
> values (will this work with FP maps?) - just create file containing color
> rules with full range of data values (min, max for all maps), assign
> colors
> to values and apply color table with r.colors to all maps (sorry, no time
> to
> test).
>
>
> Maris.
>
> On Thursday 07 September 2006 04:00, Hamish wrote:
> > for MAP in `g.mlist type=rast pat=rain*` ; do
> >   r.info -r $MAP
> > done
> >
> > If anyone has tips on constructing high-quality MPEG-4 movies from a
> > series of still frames, I'd be interested in hearing them.
> >
> >
> >
> > Hamish
>
> _______________________________________________
> grassuser mailing list
> grassuser at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grassuser
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20060907/69872a22/attachment.html


More information about the grass-user mailing list