<div dir="ltr"><div><div><div>Hi Rainer,<br><br></div>I came across this email and was wondering if you found a solution for this problem?<br></div>Cheers,<br><br></div>Paulo<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Jul 16, 2013 at 12:50 PM, Rainer M Krug <span dir="ltr"><<a href="mailto:Rainer@krugs.de" target="_blank">Rainer@krugs.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi<br>
<br>
I would like to create a new raster layer, based on the neighborhood<br>
modifier, but where the offset is not constant, but the cell value in a<br>
different map.<br>
<br>
Reasoning: I am modeling seed dispersal into neighboring cells and the<br>
direction is based on the aspect. I created the aspect in agnps format<br>
("flowdir") and I created two layers (flowdir_dx and flowdir_dy) indicating the x and y offset<br>
based on flowdir.<br>
<br>
Now when simulating the flow, I want to use:<br>
<br>
,----<br>
| r.mapcalc expression="test = seeds[flowdir_dy, flowdir_dx]" --overwrite<br>
`----<br>
<br>
but I get the following error:<br>
,----<br>
| syntax error, unexpected NAME, expecting INTEGER or '-'<br>
| Parse error<br>
| ERROR: parse error<br>
`----<br>
<br>
I assume from that error message, that I can not supply a map go get the<br>
values for the neighborhood modifier, but have to use constant values.<br>
<br>
I could put these into if statements, but I wanted to avoid these if<br>
possible.<br>
<br>
Is there a way that I can use the offset from a map?<br>
<br>
Cheers,<br>
<br>
Rainer<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Rainer M. Krug<br>
<br>
email: RMKrug<at>gmail<dot>com<br>
</font></span><br>_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
<br></blockquote></div><br></div>