Closed zstadler closed 8 years ago
Implementation can be found here: http://www.codeproject.com/Articles/18936/A-Csharp-Implementation-of-Douglas-Peucker-Line-Ap
This was fun :-) read a few papers on line simplification algorithms. Routeing is still an issue for 4wd vehicle as was written in issue #166. Not planning to solve this here...
The results are so much better!!
For your reference, attached is the original (zipped) twl file for the above example. בעקבות הלהl.zip
When a track/route is imported, it automatically gets a reduced set of ~20 "anchor" points that would be used for further routing. It looks like the reduction process may be improved if it would use the
L.LineUtil.simplify(...)
algorithm used in #165.This example shows 3 stages in applying trail-based routing on an imported route:
It looks like the "anchor" selection algorithm does not consider the "extremity" of the points along the original route. As a result, we can see sections where the original route was ignored when routing is applied. For example, here and here.
Clearly, not all differences between the target route and the automatic route are a result of the reduction mechanism because (a) The point selection of the original route may not be the best selection for defining the route, and (b) we don't true 4wd routing mode (yet).