<div dir="ltr">Hi there, sorry for the late reply.<div><br></div><div><span style="font-size:12.800000190734863px"> I went looking in the paper by Hobson (1972), and the original formula for</span><br style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px"> Fischer K is: (N-1)/(N-R), but in the module (and in my paper) I used the</span><br style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px"> *inverse* of it (so smooth areas would end up with a low value). Inverting</span><br style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px"> the formula gives (N-R)/(N-1).</span><br></div><div><span style="font-size:12.800000190734863px"><br></span></div><div><span style="font-size:12.800000190734863px">As for merging the modules, I'm ok with it. makes more senso to have a generic roughness module with several options on methods.</span></div><div><span style="font-size:12.800000190734863px"><br></span></div><div><span style="font-size:12.800000190734863px">best</span></div><div><span style="font-size:12.800000190734863px"><br></span></div><div><span style="font-size:12.800000190734863px">Carlos</span></div><div><span style="font-size:12.800000190734863px"><br></span></div><div><span style="font-size:12.800000190734863px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 25, 2017 at 8:54 PM, Steven Pawley <span dir="ltr"><<a href="mailto:dr.stevenpawley@gmail.com" target="_blank">dr.stevenpawley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Stefan,<div><br></div><div>+1 for that suggestion. There might be a few variants / other directional measures that could be included with a 'method' argument like real surface area.</div><div><br></div><div>Cheers,</div><div><br></div><div>Steve</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 25, 2017 at 3:32 PM, Blumentrath, Stefan <span dir="ltr"><<a href="mailto:Stefan.Blumentrath@nina.no" target="_blank">Stefan.Blumentrath@nina.no</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="NO-BOK" link="blue" vlink="purple">
<div class="m_-3436656805503823931m_-4976933668738610241WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Hi Steven,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">And many thanks for clarification and contrasting results in detail…<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">And sorry for throwing the question at the list without having checked that (I just scanned the module code).<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I noticed the difference in the references referred to in both modules. From scanning the code they seemed to do  the
 same thing, but now I see that the main difference is probably that r.vector.ruggedness uses slope directly for weighting vector strength, while r.roughness.vector uses the “inverted” slope / colatitude angle (90 – slope). Apart from that both modules look
 quite similar (as are the names) in terms of what they do to the DEM.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">So, there might still be a point of consolidating them into one module which offers both the “Sappington et al. 2007 metric”
 and the “Hobson 1972 metric”…<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Just a thought…<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Kind regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Stefan<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Steven Pawley [mailto:<a href="mailto:dr.stevenpawley@gmail.com" target="_blank">dr.stevenpawley@gmail.<wbr>com</a>]
<br>
<b>Sent:</b> onsdag 25. januar 2017 21.18<br>
<b>To:</b> Luca Delucchi <<a href="mailto:lucadeluge@gmail.com" target="_blank">lucadeluge@gmail.com</a>><br>
<b>Cc:</b> Blumentrath, Stefan <<a href="mailto:Stefan.Blumentrath@nina.no" target="_blank">Stefan.Blumentrath@nina.no</a>>; <a href="mailto:carlos.grohmann@gmail.com" target="_blank">carlos.grohmann@gmail.com</a>; <a href="mailto:grass-dev@lists.osgeo.org" target="_blank">grass-dev@lists.osgeo.org</a><br>
<b>Subject:</b> Re: [GRASS-dev] [GRASS GIS] #3269: r.roughness.vector: bug in rescale formula<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">There seems to be some difference in the calculation between these two add-ons. Apologies for any duplication, but in the way of explanation I wrote the parallelized r.vector.ruggedness because I needed to calculate the VRM measure in a
 hurry and was confused about the results from r.roughness.vector.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">The result from r.vector.ruggedness is identical (apart from how slope and aspect are calculated) to the result from the Sappington et al. 2007 paper and the Sappington-authored script in ArcGIS (see attached derived from the nc_spm_08
 grass dataset). The form of the calculation is slightly different (but the end result is the same) because I average rather than sum the x,y, and z rasters to avoid a strong edge effect because AFAIK r.mapcalc doesn't have an automated method of dealing with
 bordering nulls (hence the averaging workaround). The r.vector.ruggedness results are also the same as how SAGA GIS calculates this metric, and it is this version of the 'VRM' metric that has been used extensively in the literature over the past few years.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">r.roughness.vector appears to produce a very different result (see attached). Perhaps this represents an alternative implementation, but the main difference lies in how the DEM is decomposed into its x,y, and z components.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">So if the add-ons are to be merged then perhaps this needs to be resolved?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Steve<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Tue, Jan 24, 2017 at 3:43 PM, Luca Delucchi <<a href="mailto:lucadeluge@gmail.com" target="_blank">lucadeluge@gmail.com</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">On 24 January 2017 at 09:55, Blumentrath, Stefan<br>
<<a href="mailto:Stefan.Blumentrath@nina.no" target="_blank">Stefan.Blumentrath@nina.no</a>> wrote:<br>
> Hi,<br>
><br>
<br>
Hi,<br>
<br>
> Another related question: There are now two AddOns for this purpose:<br>
><br>
> r.roughness.vector (last changed 2 years ago)<br>
><br>
> and from 2016: r.vector.ruggedness<br>
><br>
> Both basically calculate the same metric(s), though they have their differences and both have their pros:<br>
> r.roughness.vector offers more advanced options (esp. useful for multi scale application)<br>
> r.vector.ruggedness uses parallelization<br>
><br>
> Having two modules for one task / metric, which are not conceptually different is a bit confusing...<br>
> IMHO both should be merged into one, keeping the strength of each of them...<br>
><br>
<br>
+1 for merging... this could be a work for the next code sprint<br>
<br>
> Other thoughts?<br>
><br>
> Cheers<br>
> Stefan<br>
><span class="m_-3436656805503823931HOEnZb"><font color="#888888"><br>
<span style="color:#888888"><br>
<span class="m_-3436656805503823931m_-4976933668738610241hoenzb">--</span><br>
<span class="m_-3436656805503823931m_-4976933668738610241hoenzb">ciao</span><br>
<span class="m_-3436656805503823931m_-4976933668738610241hoenzb">Luca</span><br>
<br>
<span class="m_-3436656805503823931m_-4976933668738610241hoenzb"><a href="http://www.lucadelu.org" target="_blank">www.lucadelu.org</a></span><br>
<span class="m_-3436656805503823931m_-4976933668738610241hoenzb">______________________________<wbr>_________________</span><br>
<span class="m_-3436656805503823931m_-4976933668738610241hoenzb">grass-dev mailing list</span><br>
<span class="m_-3436656805503823931m_-4976933668738610241hoenzb"><a href="mailto:grass-dev@lists.osgeo.org" target="_blank">grass-dev@lists.osgeo.org</a></span><br>
<span class="m_-3436656805503823931m_-4976933668738610241hoenzb"><a href="https://lists.osgeo.org/mailman/listinfo/grass-dev" target="_blank">https://lists.osgeo.org/mailma<wbr>n/listinfo/grass-dev</a></span></span><u></u><u></u></font></span></p>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
</div>

</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Prof. Carlos Henrique Grohmann<br>Institute of Energy and Environment - Univ. of São Paulo, Brazil<div>- Digital Terrain Analysis | GIS | Remote Sensing - </div><div><br></div><div><a href="http://carlosgrohmann.com/" target="_blank">http://carlosgrohmann.com</a></div><div><a href="http://orcid.org/0000-0001-5073-5572" style="font-size:13px;color:rgb(17,85,204);font-family:arial,sans-serif;background-color:rgb(255,255,255)" target="_blank">http://orcid.org/0000-0001-5073-5572</a><br><div>________________<br>Can’t stop the signal.</div></div></div></div>
</div>