[GRASS-user] r.mapcalc and the neighborhood modifier
Rainer M Krug
Rainer at krugs.de
Tue Jul 16 03:50:57 PDT 2013
Hi
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
different map.
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
possible.
Is there a way that I can use the offset from a map?
Cheers,
Rainer
--
Rainer M. Krug
email: RMKrug<at>gmail<dot>com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 486 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20130716/1a62683f/attachment.pgp>
More information about the grass-user
mailing list