<div dir="ltr"><div><div><div><div><div><div>Glynn & Rainer,<br><br></div>YES, absolutely -- I caught that and made it '==' instead of '='. When typing quickly, I sometimes make that mistake and then have to correct myself. But fundamentally, Moritz' approach worked very well and produced what I needed. I have a more difficult problem now, something I think I can only resolve by using higher resolution data. But, that is OK, too, because I should get better modeling results in the end. I'm trying to create my own approach to generating the file, that when used by the model, gives essentially the same results.<br><br></div>The folks who wrote the model and software to generate this runoff/flow connectivity file between pixels, found that with coarser pixel resolutions, the connection between pixels was badly distorted, in physically unreasonable ways. I don't have their original code, so I can not use it, plus, I really want to model at much finer spatial resolutions anyway, where the problem should go vanish.<br><br></div>So, I just need to use higher resolution DEM data, which I have, rather than trying to do things at the default 4km resolution.<br><br></div>One question I have: it would be very nice to be able to show how the pixels are connected using vectors, essentially the drainage network. Any thoughts how to do this?<br><br></div>Regards,<br></div>Tom<br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 14, 2014 at 3:21 AM, 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"><span class="">Glynn Clements <<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>> writes:<br>
<br>
> Moritz Lennert wrote:<br>
><br>
>> r.mapcalc down_id = if(dir=1, id[1,1], if(dir=2, id[0,1], if(dir=3,<br>
>> id[-1,1] .... etc<br>
><br>
> r.mapcalc follows C expression syntax; "="is assignment, "==" is the<br>
> equality test.<br>
<br>
</span>In this case shouldn't it be<br>
<br>
,----<br>
| r.mapcalc down_id = if(dir==1, id[1,1], if(dir==2, id[0,1], if(dir==3, id[-1,1] .... etc<br>
`----<br>
<br>
with "==" after the dir?<br>
<span class="HOEnZb"><font color="#888888"><br>
Rainer<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
--<br>
Rainer M. Krug<br>
email: Rainer<at>krugs<dot>de<br>
PGP: 0x0F52F982<br>
</div></div><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></blockquote></div><br><br clear="all"><br><div><br></div>
</div></div>