<div dir="ltr">Hello,<div><br></div><div>i just joined this mailing list and i hope i'm doing everything right. <br><br>I'm
 in a project where i try to provide an easy way to do a cost-distance 
analysis, based on a given raster DEM, i did this with ArcGIS earlier but i want
 more people to be able to use this simple (and faster) approach, but i ran into some
 problems.</div>
<div><br></div><div><br></div><div><br></div><div>The workflow looks like this:</div><div><br></div><div><font face="arial, helvetica, sans-serif">DEM
 -> slope -> r.mapcalc(tobler hiking function) -> cost raster 
-> r.cost -> cost distance raster -> contours that represent 
walking distance from a given point.<br>
<br>The function i use in r.mapcalc is: h/m=(0.000166666*(exp(3.5*(abs(tan( "slope_in_degree" )+0.05)))))*cellsize</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif"><br>

</font></div><div><font face="arial, helvetica, sans-serif">The problems i ran into:</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><ol><li><font face="arial, helvetica, sans-serif">This
 works with SRTM-data, but if i use a higher resolution DEM (10m), the 
resulting cost raster contains some infinite values and the r.cost tool 
doesn't really work anymore<br>
</font></li><ul><li><font face="arial, helvetica, sans-serif">Is there a way to adress "inf" in r.mapcalc? I can just filter everything > 500, but that isn't really satisfying. :)<br></font></li><li><font face="arial, helvetica, sans-serif">I
 don't really know what the underlying problem is, exp() leads to the 
infinite values, but maybe there is a way to filter those extreme slopes
 earlier or in the DEM (although the slope raster contains only values 
<90°)?<br>
<br></font></li></ul><li><font face="arial, helvetica, sans-serif"><span style="line-height:107%" lang="EN-GB">ERROR:
G_malloc: unable to allocate 524288 bytes of memory at setup.c:64 - happens at </span><span style="line-height:107%" lang="EN-GB">144.024.001
 pixels (merged SRTM-DEM of Spain) and above if i don't set "Percent of 
map to keep in memory" to quite low values of below 20-30%, although 
neither my RAM nor the harddrive with the .tmp-folder is fully utilized. The problem is: What 
happens at even higher pixelcounts?<br>
<br></span></font></li><li><span style="line-height:107%" lang="EN-GB"><font face="arial, helvetica, sans-serif">This
 may be the wrong place for this but: Usability-wise it would be even 
nicer to use QGIS and its modelbuilder for this approach. The problem is
 that the parameters for stop_point or stop_coordinate can't stay empty 
in the QGIS-GUI (which it has to be, since the whole raster should be 
processed). Maybe there is a way to work around this?<br>
<br></font></span></li></ol><div><span style="line-height:15.6933px"><font face="arial, helvetica, sans-serif">So, i'd be happy if someone could help me. Here is also an example (</font></span><font face="arial, helvetica, sans-serif"><span style="line-height:15.6933px"><a href="https://www.dropbox.com/s/i6rsm9v9p7gwfx2/01_isochronen_arroyotobler_ardales.png" target="_blank">https://www.dropbox.com/s/i6rsm9v9p7gwfx2/01_isochronen_arroyotobler_ardales.png</a>)</span></font><span style="font-family:arial,helvetica,sans-serif;line-height:15.6933px"> of what i'm trying to do, so that it's less abstract. :-)<br>

<br><br>Thanks in advance and have a nice week<br><br></span></div><div><span style="font-family:arial,helvetica,sans-serif;line-height:15.6933px">Daniel<br></span></div></div></div>