logo separator

[mkgmap-dev] Wrong Douglas-Peucker implementation?

From Gerd Petermann gpetermann_muenchen at hotmail.com on Thu Jun 10 06:30:22 BST 2021

Hi Andrzej,

I don't see any specific difference in the behaviour, but overall the JOSM algo removes a few more points compared to the mkgmap version.
With r4763 you can simply replace the call to shortestDistToLineSegment() by distToLineSegment() in DouglasPeuckerFilter.java
Reg. speed it probably doesn't matter that much. I looked at this because VisualVM claimed that Douglas-Peucker is responsible for a lot of run time but now I think that VisualVM was wrong.

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Andrzej Popowski <popej at poczta.onet.pl>
Gesendet: Dienstag, 8. Juni 2021 21:43
An: mkgmap-dev at lists.mkgmap.org.uk
Betreff: Re: [mkgmap-dev] Wrong Douglas-Peucker implementation?

Hi Gerd,

Josm's algorithm removes some spikes, which probably aren't common for
real data and layer 0 of img. So differences aren't big. But maybe for
lower resolution it could be better, especially for polygons.

Wouldn't it be faster?

--
Best regards,
Andrzej
_______________________________________________
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk
https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


More information about the mkgmap-dev mailing list