[GRASS-dev] [GRASS-user] cost surface with negative friction odd behavior

Michael Barton Michael.Barton at asu.edu
Thu Nov 30 12:13:24 PST 2023


Done
_____________________________

C. Michael Barton
Associate Director, School of Complex Adaptive Systems (https://scas.asu.edu<https://scas.asu.edu/>)
Professor, School of Human Evolution & Social Change (https://shesc.asu.edu)
Director, Center for Social Dynamics & Complexity (https://complexity.asu.edu)
Arizona State University
Tempe, AZ 85287-2701
USA

Executive Director, Open Modeling Foundation (https://openmodelingfoundation.github.io<https://openmodelingfoundation.github.io/>)
Director, Network for Computational Modeling in Social & Ecological Sciences (https://comses.net)

personal website: http://www.public.asu.edu/~cmbarton


On Nov 30, 2023, at 11:29 AM, Anna Petrášová <kratochanna at gmail.com> wrote:

Michael, could you please create a PR for the documentation?

On Wed, Nov 29, 2023 at 3:56 PM Michael Barton via grass-user <grass-user at lists.osgeo.org<mailto:grass-user at lists.osgeo.org>> wrote:
Thanks Anna and Doug,

I did not expect it to work (thought it would be useful if it did). Rather I was surprised by the fact that r.walk DID run and that it gave very odd results.

Adding to the docs is a good idea. Even better would also to have a friction map with a negative value (min<0) raise an error in r.walk, saying that all values in a friction map must be ≥ 0

Michael
_____________________________

C. Michael Barton
Associate Director, School of Complex Adaptive Systems (https://scas.asu.edu<https://scas.asu.edu/>)
Professor, School of Human Evolution & Social Change (https://shesc.asu.edu<https://shesc.asu.edu/>)
Director, Center for Social Dynamics & Complexity (https://complexity.asu.edu<https://complexity.asu.edu/>)
Arizona State University
Tempe, AZ 85287-2701
USA

Executive Director, Open Modeling Foundation (https://openmodelingfoundation.github.io<https://urldefense.com/v3/__https://openmodelingfoundation.github.io/__;!!IKRxdwAv5BmarQ!cD06dCgbgbISy5GfjOmmNAaDn0di5MhfP9j0LhdTycnfvlp8eq4SrZNHlkc4Ekh_TesD_TyM5clf17XA3uJdoE_v$>)
Director, Network for Computational Modeling in Social & Ecological Sciences (https://comses.net<https://urldefense.com/v3/__https://comses.net__;!!IKRxdwAv5BmarQ!cD06dCgbgbISy5GfjOmmNAaDn0di5MhfP9j0LhdTycnfvlp8eq4SrZNHlkc4Ekh_TesD_TyM5clf17XA3rtQ9dtL$>)

personal website: http://www.public.asu.edu/~cmbarton


On Nov 29, 2023, at 1:00 PM, grass-user-request at lists.osgeo.org<mailto:grass-user-request at lists.osgeo.org> wrote:

Date: Wed, 29 Nov 2023 10:17:19 -0500
From: Anna Petr??ov? <kratochanna at gmail.com<mailto:kratochanna at gmail.com>>
To: Michael Barton <Michael.Barton at asu.edu<mailto:Michael.Barton at asu.edu>>
Cc: GRASS developers <grass-dev at lists.osgeo.org<mailto:grass-dev at lists.osgeo.org>>, GRASS user list
<grass-user at lists.osgeo.org<mailto:grass-user at lists.osgeo.org>>
Subject: Re: [GRASS-user] cost surface with negative friction odd
behavior
Message-ID:
<CAE0EDEoFhX75U2r6qC8eK5p8czg2Cd1iWR8J3vX8QiWWE8zNUw at mail.gmail.com<mailto:CAE0EDEoFhX75U2r6qC8eK5p8czg2Cd1iWR8J3vX8QiWWE8zNUw at mail.gmail.com>>
Content-Type: text/plain; charset="utf-8"

I think r.walk was not written for negative friction and while I imagine
some small (in absolute sense) negative values may work, your negative
values are pretty extreme, meaning the resulting travel time through a cell
would be negative. That can cause all kinds of issues in the algorithm. So
I would say friction should not be negative. I am not sure I would check
that in the code, because you would need to check that for each cell and I
think it's unnecessary overhead. Maybe just adding a note to documentation
may be enough. I haven't looked into the code itself, so this is just my
guess.

Anna

On Tue, Nov 28, 2023 at 5:48?PM Michael Barton via grass-user <
grass-user at lists.osgeo.org<mailto:grass-user at lists.osgeo.org>> wrote:

_______________________________________________
grass-user mailing list
grass-user at lists.osgeo.org<mailto:grass-user at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/grass-user<https://urldefense.com/v3/__https://lists.osgeo.org/mailman/listinfo/grass-user__;!!IKRxdwAv5BmarQ!cD06dCgbgbISy5GfjOmmNAaDn0di5MhfP9j0LhdTycnfvlp8eq4SrZNHlkc4Ekh_TesD_TyM5clf17XA3igf0Dkc$>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20231130/be988609/attachment-0001.htm>


More information about the grass-dev mailing list