[GRASS-user] Loop skript

Hamish hamish_b at yahoo.com
Fri Jan 8 18:54:41 EST 2010

Niels Thevs wrote:
> currently I deal with time series data with raster names
> like xxx. 1, xxx.2, xxx.3, etc. I want to fill Null data with
> data from neighbouring raster layser. So, if there are Null data
> in xxx.1 I want to replace them with the values from xxx.2 etc.
> How could I formulate a script, in which like i a loop xxx.1 is
> tested for Null data and, if necessary filled with values from
> xxx.2, than xxx.2 is tested and so on.

no need for a loop, r.patch will do it directly. The order that
you give the input maps determines which map will take precedence.

> Regularly, I use Grass under Windows. If such a skript is
> only possible under Linux, I would shift for that to Linux.

Beware if you use Vista you might have to switch off UAC to
get r.patch to work. The latest theory suggests that renaming
r.patch.exe to r.fred.exe (or r.niels.exe or whatever) will also
solve it. (This is almost as dear as pressing Cancel at the
login prompt to successfully login if you didn't know the login
password for Win95/98)

If you are not running 32bit Vista and it still breaks, or
if it breaks and the r.fred.exe solution actually works, we'd
like to hear about it.



More information about the grass-user mailing list