[GRASS-user] r.mapcalc and the neighborhood modifier
Rainer M Krug
Rainer at krugs.de
Tue Jul 16 03:50:57 PDT 2013
I would like to create a new raster layer, based on the neighborhood
modifier, but where the offset is not constant, but the cell value in a
Reasoning: I am modeling seed dispersal into neighboring cells and the
direction is based on the aspect. I created the aspect in agnps format
("flowdir") and I created two layers (flowdir_dx and flowdir_dy) indicating the x and y offset
based on flowdir.
Now when simulating the flow, I want to use:
| r.mapcalc expression="test = seeds[flowdir_dy, flowdir_dx]" --overwrite
but I get the following error:
| syntax error, unexpected NAME, expecting INTEGER or '-'
| Parse error
| ERROR: parse error
I assume from that error message, that I can not supply a map go get the
values for the neighborhood modifier, but have to use constant values.
I could put these into if statements, but I wanted to avoid these if
Is there a way that I can use the offset from a map?
Rainer M. Krug
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 486 bytes
Desc: not available
More information about the grass-user