Once again thank you very much.<br>As far as I understood, the formula that you mentioned:<br><div style="margin-left: 40px;">slope = (Points-&gt;z[Points-&gt;n_points - 1] - Points-&gt;z[0]) / len<br></div>gives the tangent of the slope, since<br>
<div style="margin-left: 40px;">“(Points-&gt;z[Points-&gt;n_points - 1] – Points-&gt;z[0])”<br></div>gives the difference between the altitude values of the endpoints of a given line; in other words, it gives the “rise”. And,<br>
<div style="margin-left: 40px;">“len”<br></div>is the length of the line.<br>So, if this is correct, to convert the result of this formula into percentage values we only have to multiply it by “100”, since<br><div style="margin-left: 40px;">
“slope in percent=tan*100”<br></div>For instance, a 11º slope is equivalent to a 19,44% slope because<br><div style="margin-left: 40px;">“TAN 11º = 0,1944”, and, “0,1944*100=19,44”<br></div>In conclusion, if the option “slope” of “v.to.db” gives as a result “0,033” (a tangent value) it means that we have a “3,3%” slope.<br>
Please, if I&#39;m wrong in any one of these steps, please let me know...<br><br>Cheers!<br><br><br><br>2011/6/2 Markus Neteler &lt;<a href="mailto:neteler@osgeo.org">neteler@osgeo.org</a>&gt;<br>&gt;<br>&gt; On Wed, Jun 1, 2011 at 10:02 PM, Francisco Calzada<br>
&gt; &lt;<a href="mailto:paco.calzada2000@gmail.com">paco.calzada2000@gmail.com</a>&gt; wrote:<br>&gt; &gt; Thank you so much!!! Your answers were really useful.<br>&gt; &gt;<br>&gt; &gt; Anyway, I would like to ask you:<br>
&gt; &gt;<br>&gt; &gt; a) the result of the option “slope” of v.to.db is expressed in degrees or in<br>&gt; &gt; percent units?<br>&gt; &gt;<br>&gt; &gt; b) if it is in degrees is there any easy way to change it to percent?<br>
&gt;<br>&gt; The formula is coded like this in C:<br>&gt;<br>&gt;   slope = (Points-&gt;z[Points-&gt;n_points - 1] - Points-&gt;z[0]) / len;<br>&gt;<br>&gt; Calculations on attributes can be done with v.db.update when not using<br>
&gt; the DBF driver (but SQLite or other).<br>&gt;<br>&gt; Markus<br><br>