<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Daniel<br>
<br>
For the first problem I would sugest you to filter high slope
values <br>
<br>
<font face="arial, helvetica, sans-serif"> r.mapcalc </font><font
face="arial, helvetica, sans-serif">h_m=if(slope<70,
(0.000166666*(exp(3.5*(abs(tan( "slope_in_degree"
)+0.05)))))*cellsize</font>, null())<br>
<br>
For the second problem, did you try to use a smaller percentage
(say 10%)?<br>
<br>
best regards<br>
<br>
El 24/03/14 10:15, Daniel Becker escribió:<br>
</div>
<blockquote
cite="mid:CAHNCLdByVfkTbSbgtt8ZBtyuLV9W4ywOC9yzU9RfBYR7SHc+xQ@mail.gmail.com"
type="cite">
<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 moz-do-not-send="true"
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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
grass-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/grass-user">http://lists.osgeo.org/mailman/listinfo/grass-user</a></pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
=======================================================================
Juan Carlos Torres | <a class="moz-txt-link-freetext" href="http://lsi.ugr.es/~jctorres">http://lsi.ugr.es/~jctorres</a>
Laboratorio de Realidad Virtual | Tlf.: (+34) 645 885 167
Dpto. Lenguajes y Sistemas Informaticos | (+34) 958 249 307
ETS. Ing. Informatica | interno ugr 71 260
Univ. de Granada | FAX: (+34) 958 243 179
======================================================================= </pre>
</body>
</html>