<HTML>
<HEAD>
<TITLE>Re: [GRASS-user] negative slope values and movement costs</TITLE>
</HEAD>
<BODY>
<FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>If you are calculating round-trip, simply create a slope map and use the original Tobler algorithm to make a positive (i.e. uphill) cost map and a negative (downhill) cost map. Then add them together and use the summed result as the basis for a round-trip cost surface. If you are doing one-way only you&#8217;ll need an anisotropic algorithm. Perhaps you can modify the coefficients in r.walk to simulate a Tobler result. If not you can create the whole thing in the map calculator (e.g., using neighborhood functions) or the best way would be to work with Markus on r.walk to add the Tobler algorithm as an option if it is widely used and generally desirable.<BR>
<BR>
Michael<BR>
<BR>
<BR>
On 2/1/07 9:36 AM, &quot;Miguel Correia&quot; &lt;miguellage.rc@gmail.com&gt; wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><SPAN STYLE='font-size:12.0px'><FONT FACE="Arial Narrow">Hello Michael.<BR>
I understand your point. R.walk does create anisotropic cost movements in one-way travel, in the sense that calculates differently downhill and uphill costs. The problem is that it is based on Naismith's algorithm. For the modeling I'm trying to produce, will generate more accurate results another algorithm: Tobler's one. <BR>
I guess I already have resolved the problem. In Tobler's hiking function, in average, there is a difference of 1km/hr in the same slope value, positive or negative. For example, at 10&ordm; is estimated 3Km/hr and at -10&ordm;, 4km/hr. This means that the difference between them is an average distance value of 500 meters, which in kilometers is expressed 0.05Km. This is the number that Tobler sums to the positive slope value to calibrate the anisotropic cost movement. For each positive slope value, there is an increment of 0.05km to get the average value of its correspondent negative value. This is the algorithm: <BR>
&nbsp;<BR>
6* exp (-3.5 * abs(Slope + 0.05)) <BR>
&nbsp;<BR>
And it's logic: if we sum in map algebra, let's say, a cell value of 10&ordm; of a 'positive slope surface' and the correspondent value in a 'negative slope surface', -10&ordm;, we would get 3km/hr in the first case and 4km/hr in the second case: what is the average? 0.05Km!!!<BR>
What do you think about this, Michael? Do you think I'm right?<BR>
Thanks for your help.<BR>
Miguel.<BR>
</FONT><FONT FACE="Verdana, Helvetica, Arial"><BR>
<BR>
2007/2/1, Michael Barton &lt;michael.barton@asu.edu&gt;: <BR>
</FONT></SPAN><BLOCKQUOTE><SPAN STYLE='font-size:12.0px'><FONT FACE="Verdana, Helvetica, Arial">R.cost creates an isotropic cost surface. If a slope map is used to create a<BR>
cost surface using r.cost, All slopes of the same magnitude have the same <BR>
costs (i.e., the cost is the same whether you are going uphill or downhill).<BR>
This can be OK for 2-way travel (out and back), but can be problematic when<BR>
calculating 1-way costs.<BR>
<BR>
As I understand it, r.walk will calculate an anisotropic cost surface--i.e.,<BR>
such that uphill and downhill costs are calculated differently. It also<BR>
allows for inclusion of an additional friction surface to weight costs and<BR>
input of coefficients to automatically calculate walking (or theoretically <BR>
other) energy costs.<BR>
<BR>
Multiplying a slope map by -1 would only make all slopes negative rather<BR>
than leaving some positive and some negative. You could multiply by a<BR>
function of the aspect to make upslope positive, downslope negative, and <BR>
'aroundslope' in between.<BR>
<BR>
However, what is uphill and what is downhill will depend on the specific<BR>
route. That is, the uphill direction will vary depending on the direction of<BR>
travel outward from a point of origin. I believe that r.walk takes this into<BR>
account.<BR>
<BR>
Michael<BR>
<BR>
<BR>
On 2/1/07 1:40 AM, &quot;Gerald Nelson&quot; &lt;gnelson@uiuc.edu&gt; wrote:<BR>
<BR>
&gt; Why do you want negative slope values? <BR>
&gt;<BR>
&gt; What r.cost does is calculate the smallest cost of moving over a friction<BR>
&gt; surface, which could be slope, to one or more destinations.<BR>
&gt;<BR>
&gt; The manual for the command is here.<BR>
&gt;<BR>
&gt; <a href="http://grass.itc.it/gdp/html_grass63/r.cost.html">http://grass.itc.it/gdp/html_grass63/r.cost.html</a><BR>
&gt;<BR>
&gt; Jerry<BR>
&gt;<BR>
&gt; ---- Original message ----<BR>
&gt;&gt; Date: Thu, 1 Feb 2007 09:05:33 +0100 (CET) <BR>
&gt;&gt; From: mlage@usal.es<BR>
&gt;&gt; Subject: Re: [GRASS-user] negative slope values and movement costs<BR>
&gt;&gt; To: grassuser@grass.itc.it &nbsp;<a href="mailto:grassuser@grass.itc.it">&lt;mailto:grassuser@grass.itc.it&gt;</a> <BR>
&gt;&gt;<BR>
&gt;&gt; Thank you Jerry.<BR>
&gt;&gt; How does r.cost produce negative slope values?<BR>
&gt;&gt;<BR>
&gt;&gt; Miguel<BR>
&gt;&gt;<BR>
&gt;&gt; _______________________________________________<BR>
&gt;&gt; grassuser mailing list <BR>
&gt;&gt; grassuser@grass.itc.it<BR>
&gt;&gt; <a href="http://grass.itc.it/mailman/listinfo/grassuser">http://grass.itc.it/mailman/listinfo/grassuser</a><BR>
&gt; Gerald Nelson <BR>
&gt; Professor, Dept. of Agricultural and Consumer Economics<BR>
&gt; University of Illinois, Urbana-Champaign<BR>
&gt; office: 217-333-6465<BR>
&gt; cell: 217-390-7888<BR>
&gt; 315 Mumford Hall<BR>
&gt; 1301 W. Gregory<BR>
&gt; Urbana, IL 61801<BR>
&gt;<BR>
&gt;<BR>
<BR>
__________________________________________<BR>
Michael Barton, Professor of Anthropology<BR>
School of Human Evolution &amp; Social Change<BR>
Center for Social Dynamics &amp; Complexity <BR>
Arizona State University<BR>
<BR>
phone: 480-965-6213<BR>
fax: 480-965-7671<BR>
www: <a href="http://www.public.asu.edu/~cmbarton">http://www.public.asu.edu/~cmbarton</a><BR>
<BR>
<BR>
_______________________________________________ <BR>
grassuser mailing list<BR>
grassuser@grass.itc.it<BR>
<a href="http://grass.itc.it/mailman/listinfo/grassuser">http://grass.itc.it/mailman/listinfo/grassuser</a><BR>
<BR>
</FONT></SPAN></BLOCKQUOTE><SPAN STYLE='font-size:12.0px'><FONT FACE="Verdana, Helvetica, Arial"><BR>
</FONT></SPAN></BLOCKQUOTE><SPAN STYLE='font-size:12.0px'><FONT FACE="Verdana, Helvetica, Arial"><BR>
<BR>
__________________________________________<BR>
Michael Barton, Professor of Anthropology<BR>
School of Human Evolution &amp; Social Change &nbsp;&nbsp;&nbsp;<BR>
Center for Social Dynamics and Complexity<BR>
Arizona State University<BR>
<BR>
phone: 480-965-6213<BR>
fax: 480-965-7671<BR>
www: <a href="http://www.public.asu.edu/~cmbarton">http://www.public.asu.edu/~cmbarton</a> <BR>
</FONT></SPAN>
</BODY>
</HTML>