Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>well, it all depends on how you define tortuosity. there is a <a href="http://en.wikipedia.org/wiki/Tortuosity" rel="nofollow">wikipedia article regarding tortuosity</a>, which may shed some light on the subject.</p> <p>an interesting sentence in the article tells us that: <code>"roughness (or tortuosity) could be measured by relative change of curvature"</code>. that makes a good starting point. </p> <p>your polyline is made of adjacent line segments. you can compute the angle between each adjacent line segment. using this information you can get a good idea of tortuosity for your polyline. for example, let <code>seg(n)</code> be the line segment between point <code>n</code> and point <code>n+1</code>: </p> <pre><code>tortuosity = sum(abs(angle(seg(n), seg(n+1))) for n in 1 to number of segment) </code></pre> <p><em>(computing the angle between 2 line segments is left as an exercise, but does not require a degree in mathematics)</em></p> <p>the above measure is not scaled: the more points you have, the higher the value might be. you can easily scale this result according to the number of line segments you have:</p> <pre><code>unit_tortuosity = tortuosity / (n * pi) </code></pre> <p><em>(the maximum angle between 2 line segments is <code>pi</code>, adjust your <code>angle()</code> function so that it returns a result between <code>0</code> and <code>pi</code>. so your tortuosity would be at most <code>n*pi</code>, hence the above scaling factor which allows to have a value between <code>0</code> and <code>1</code> with <code>0</code> representing a perfectly straight polyline)</em></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload