[GRASS-dev] v.cellstats script

Markus Neteler neteler at itc.it
Fri Nov 17 10:55:02 EST 2006

Martin Wegmann wrote on 11/17/2006 02:34 PM:
> Hello,
> Carlos Grohmann and I created a script as substitute for v.cellstats. It would 
> be great if somebody can look through it to give feed-back how to improve it 
> before we post it to the WIKI.
> regards, 
Hi Martin, Carlos,

two quick observations:

This is a bash-ism AFAIK (still needs to be eliminated in some scripts):
   export LC_NUMERIC=C

Before doing that the current region should be saved. In an older mail
from Glynn it was described how to solve it in an elegant way:
   #set to current input map region
   g.region rast=$GIS_OPT_raster

Of course the current region should be restored at the end of the script
and in case of "trap" (which isn't there, see cleanup() in other scripts).


More information about the grass-dev mailing list