Moritz Lennert wrote: > r.mapcalc down_id = if(dir=1, id[1,1], if(dir=2, id[0,1], if(dir=3, > id[-1,1] .... etc r.mapcalc follows C expression syntax; "="is assignment, "==" is the equality test. -- Glynn Clements <glynn at gclements.plus.com>