[GRASS-dev] r.mapcal and python

Roberto Antolí­n rantolin.geo at gmail.com
Mon Nov 10 10:55:35 EST 2008


Ciao Maxi,
Nice to hear from you! Everything's ok?

Massimiliano Cannata escribió:
> Ciao Roberto,
> try with this solution:
> 
> output='yourmap'
> map1='yourmap1'
> map2='yourmap2'
> cmdargs2=["%s=if(%s>%s,10000,0)"%(output,map1,map2)]
> os.spawnvp(os.P_WAIT,"r.mapcalc", ["r.mapcalc"] + cmdargs2)

Thank you, Maxi! It works perfectly well. I think I'll use this solution 
rather than the grass.py library for 'r.mapcalc'.

Regards,
Roberto.





More information about the grass-dev mailing list