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->z[Points->n_points - 1] - Points->z[0]) / len<br></div>gives the tangent of the slope, since<br>
<div style="margin-left: 40px;">“(Points->z[Points->n_points - 1] – Points->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'm wrong in any one of these steps, please let me know...<br><br>Cheers!<br><br><br><br>2011/6/2 Markus Neteler <<a href="mailto:neteler@osgeo.org">neteler@osgeo.org</a>><br>><br>> On Wed, Jun 1, 2011 at 10:02 PM, Francisco Calzada<br>
> <<a href="mailto:paco.calzada2000@gmail.com">paco.calzada2000@gmail.com</a>> wrote:<br>> > Thank you so much!!! Your answers were really useful.<br>> ><br>> > Anyway, I would like to ask you:<br>
> ><br>> > a) the result of the option “slope” of v.to.db is expressed in degrees or in<br>> > percent units?<br>> ><br>> > b) if it is in degrees is there any easy way to change it to percent?<br>
><br>> The formula is coded like this in C:<br>><br>> slope = (Points->z[Points->n_points - 1] - Points->z[0]) / len;<br>><br>> Calculations on attributes can be done with v.db.update when not using<br>
> the DBF driver (but SQLite or other).<br>><br>> Markus<br><br>