IsraelHikingMap / Site

Israel Hiking Map has maps, route planning, and travel information for Israel. This repository holds the files needed for running the Israel Hiking Map site and apps.
https://israelhiking.osm.org.il/
Other
80 stars 32 forks source link

Evaluate the "Simplify" algorithm when importing a route #173

Closed zstadler closed 8 years ago

zstadler commented 8 years ago

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).

HarelM commented 8 years ago

Implementation can be found here: http://www.codeproject.com/Articles/18936/A-Csharp-Implementation-of-Douglas-Peucker-Line-Ap

HarelM commented 8 years ago

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...

zstadler commented 8 years ago

The results are so much better!!

For your reference, attached is the original (zipped) twl file for the above example. בעקבות הלהl.zip