logo separator

[mkgmap-dev] line/polygon filters fix

From Ticker Berkin rwb-mkgmap at jagit.co.uk on Thu Mar 25 09:47:21 GMT 2021

Hi Gerd

Yes, you're right.

I've changed it so it only keeps polygons correctly closed.

Ticker

On Wed, 2021-03-24 at 18:54 +0000, Gerd Petermann wrote:
> Hi Ticker,
> 
> I don't understand the last changes in RoundCoordsFilter.java. What
> if the replaced 1st point is preserved?
> 
> 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 14:17
> An: Development list for mkgmap
> Betreff: Re: [mkgmap-dev] line/polygon filters fix
> 
> Hi Gerd
> 
> I don't get any detectable failures, but this might cause
> difficulties
> with adjacent junctions and/or housenumbers.
> 
> If there are two adjacent equal points, with the first not preserved
> and the second preserved, the existing RemoveObsoleteFilter will
> replace the first with the second and leave the second in as well.
> The
> code clearly intended not to duplicate the preserved point, and, if
> they were the other way around, doesn't.
> 
> Ticker
> 
> On Tue, 2021-03-23 at 12:38 +0000, Gerd Petermann wrote:
> > 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
> > _______________________________________________
> > mkgmap-dev mailing list
> > mkgmap-dev at lists.mkgmap.org.uk
> > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: filters_v2.patch
Type: text/x-patch
Size: 6062 bytes
Desc: not available
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20210325/fee5bd87/attachment-0001.bin>


More information about the mkgmap-dev mailing list