<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div>
<div>In teaching a class about modeling movement, we talked about how to represent a cost surface when some areas of terrain (e.g., water or paved roads), could be crossed more rapidly than walking across unmodified topography. Since a friction map for r.walk
adds cost in seconds/meter to the cost of walking across unmodified terrain, I wondered if a friction map with **negative costs** would decrease the movement costs across a landscape. </div>
<div><br>
</div>
<div>Using the SC demo data set, I tried this with a set of maps I prepared for class. Previously, I had created a friction map from the landclass96 map such that cells with water (class 20) have a value of 90 sec/m, dense vegetation (classes 7-19) have a value
of 20 sec/m, and the rest of the cells have a value of 0 sec/m. I generated a cost surface with r.walk using elevation and this friction map with a starting point from the Dorothea Dix Hospital. </div>
<div><br>
</div>
<div>r.walk --overwrite -k elevation=elevation@PERMANENT friction=landclass96_friction output=dd_hospital_seconds_friction outdir=dd_hospital_directions_friction start_points=DD_hospital memory=1000</div>
<div><br>
</div>
<div>This behaved as expected and created a cost surface that represented different degrees of difficulty in crossing vegetated and inundated terrain. </div>
<div><br>
</div>
<div>To explore what would happen with a friction surface with negative numbers, I simply subtracted the previous friction map from 0 so that dense vegetation = -20, water = -90, and the rest of the cells = 0. Then I used it with r.walk and the elevation DEM. </div>
<div><br>
</div>
<div>r.walk -k elevation=elevation@PERMANENT friction=landclass96_friction_negative output=dd_hospital_seconds_negativefriction outdir=dd_hospital_directions_negativefriction start_points=DD_hospital memory=2000</div>
<div><br>
</div>
<div>There was no error, but the resulting cost surface is very strange. </div>
<div><br>
</div>
<div>The data range of the original cost surface with the positive values friction map is: </div>
<div><br>
</div>
<div>Range of data: min = 0 max = 103883.003593944 (max of 28.8 hours to reach the hospital given added costs of walking through dense vegetation or avoiding water). </div>
<div><br>
</div>
<div>However, the data range of the cost surface made with the friction map with negative values is completely weird. </div>
<div><br>
</div>
<div>Range of data: min = -166202271.811971 max = -154320.938078961 (-46167 to -43 hours)</div>
<div><br>
</div>
<div>Since a friction map simply adds cost to the cost surface, if a negative friction map did not work, I might expect it to raise an error or have no impact (values < 0 become 0). But the values in the resulting cost surface don't make any sense at all. </div>
<div><br>
</div>
<div>Does anyone have any thoughts on this? </div>
</div>
<div><br>
</div>
<div>I will try to attach attach the original friction map made from the SC landclass96 map, the cost surface made with elevation and friction map, and cost surface made with elevation and negative friction map. </div>
<div><br>
</div>
<div>Michael</div>
<div><br>
</div>
<div><attachment title="landclass96_friction.png" type="image/png" subtitle="186 KB"></attachment><attachment title="costs2hospital_with_friction.jpeg" type="image/jpeg" subtitle="41 KB"></attachment><attachment title="costs2hospital_with_negativefriction.png" type="image/png" subtitle="165 KB"></attachment></div>
<div>
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="caret-color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="caret-color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div style="orphans: 2; text-align: -webkit-auto; text-indent: 0px; widows: 2; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<font>
<div style="caret-color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; line-height: normal;">
<font color="#929292" face="Calibri" style="font-style: normal; font-size: 11px;">_____________________________</font></div>
<div style="font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; line-height: normal;">
<p style="margin-bottom: 0in;"><font color="#929292" face="Calibri" style="font-style: normal; font-size: 11px;"><font><span style="caret-color: rgb(94, 94, 94);">C. Michael Barton<br>
Associate Director, School of Complex Adaptive Systems (</span></font><a href="https://scas.asu.edu/" style="caret-color: rgb(94, 94, 94);">https://scas.asu.edu</a><font><span style="caret-color: rgb(94, 94, 94);">)<br>
Professor, School of Human Evolution & Social Change (<a href="https://shesc.asu.edu">https://shesc.asu.edu</a>)<br>
Director, Center for Social Dynamics & Complexity (<a href="https://complexity.asu.edu">https://complexity.asu.edu</a>)<br>
Arizona State University<br>
Tempe, AZ 85287-2701<br>
USA<br>
<br>
Executive Director, Open Modeling Foundation (</span></font><a href="https://openmodelingfoundation.github.io/" style="caret-color: rgb(94, 94, 94);">https://openmodelingfoundation.github.io</a><font><span style="caret-color: rgb(94, 94, 94);">)<br>
Director, Network for Computational Modeling in Social & Ecological Sciences (<a href="https://comses.net">https://comses.net</a>)<br>
<br>
personal website: <a href="http://www.public.asu.edu/~cmbarton">http://www.public.asu.edu/~cmbarton</a> <br>
</span></font></font><br>
</p>
</div>
</font></div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
</body>
</html>