[GRASS-user] Re: [GRASSLIST:1184] how to keep same color table
for a bunch of rasters?
maris.gis at gmail.com
Thu Sep 7 04:12:55 EDT 2006
one thing why I love GRASS - it works from comandline :)
To automate GRASS tasks You can use ANY programming language You are familiar
and wich can run shell commands (I used PHP as I was more familiar with PHP).
I attached simple script for beginning. Just tweak it's values, add aditional
GRASS comands to get nice looking output. Almost all GRASS modules have
comandline options to do things that can be done with mouse, just look at
On Thursday 07 September 2006 10:46, Vishal Mehta wrote:
> 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
> 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
> 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
> Can you suggest a way to automate the above?
> 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 --------------
A non-text attachment was scrubbed...
Size: 356 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-user/attachments/20060907/5055f554/show.bin
More information about the grass-user