[GRASS-user] A question before I embark on a programming exercise

Thomas Adams tea3rd at gmail.com
Fri Nov 14 06:05:41 PST 2014


Glynn & Rainer,

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.

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.

So, I just need to use higher resolution DEM data, which I have, rather
than trying to do things at the default 4km resolution.

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?

Regards,
Tom

On Fri, Nov 14, 2014 at 3:21 AM, Rainer M Krug <Rainer at krugs.de> wrote:

> Glynn Clements <glynn at gclements.plus.com> writes:
>
> > 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.
>
> In this case shouldn't it be
>
> ,----
> | r.mapcalc down_id = if(dir==1, id[1,1], if(dir==2, id[0,1], if(dir==3,
> id[-1,1] .... etc
> `----
>
> with "==" after the dir?
>
> Rainer
>
> --
> Rainer M. Krug
> email: Rainer<at>krugs<dot>de
> PGP: 0x0F52F982
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20141114/ab2e2770/attachment-0001.html>


More information about the grass-user mailing list