logo separator

[mkgmap-dev] Putting the DP code under the microscope

From Johann Gail johann.gail at gmx.de on Wed Jun 17 21:50:53 BST 2009


Thilo Hannemann schrieb:
> Here is another approach to the "lost last point". The Douglas Peucker 
> filter is improved so that it can deal with identical start- and 
> endpoints. If the start- and the endpoint are identical, the algorithm 
> calculates the distance between these identical points and the point 
> p. So the polygon is not split at point N/2, but at the point that has 
> the greatest distance from the start-/endpoint.
>
> Dealing with the problem in the Douglas Peucker algorithm itself has 
> the advantage that it will also work for a pathological polygon or way 
> that has identical, non-consecutive points in the middle of it.
>
>
Yes, I like this idea too. It is better to search the point with the 
highst distance instead of simply asume N/2.

Regards,
Johann



More information about the mkgmap-dev mailing list