Hi Ticker,

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

Gerd

________________________________________
Von: mkgmap-dev <[email protected]> im Auftrag von Ticker 
Berkin <[email protected]>
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
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to