logo separator

[mkgmap-dev] line/polygon filters fix

From Gerd Petermann gpetermann_muenchen at hotmail.com on Tue Mar 23 12:38:12 GMT 2021

Hi Ticker,

please add a unit test that shows where the old code fails.

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap at jagit.co.uk>
Gesendet: Dienstag, 23. März 2021 13:10
An: mkgmap development
Betreff: [mkgmap-dev] line/polygon filters fix

Hi Gerd

I was trying to diagnose a problem with a repeating points in polylines
as reported by GPSMapEdit and found a problem in
RemoveObsoletePointsFilter where it duplicates a point.

Also in this and/or RoundCoordsFilter I've made some changes:
1/ stop the chain when polygons get too small
2/ keep polygons closed with the same first/last point
3/ slight logic tidy-up
4/ add a couple of debug lines to be consistent

Patch attached.

Actually these didn't make any difference to the repeating points
problem. This happens when there are enough unused bits in the last
byte of the polyline bitsteam to represent an extra point. I can't see
any good way of stopping this.

Ticker


More information about the mkgmap-dev mailing list