logo separator

[mkgmap-dev] line/polygon filters fix

From Ticker Berkin rwb-mkgmap at jagit.co.uk on Thu Mar 25 10:14:48 GMT 2021

Hi Gerd

I doubt if forced close is needed - a mix of identical and equal
endPoint polygons has been fed through the filters and RGN polyline
processing for a long time without *noticeable* problems.

But I was trying to diagnose a problem that could have been caused by
the point duplication or the not-properly-closed polygons and it seemed
better to fix and make consistent on my way to finding where the
problem lay.

Ticker

On Thu, 2021-03-25 at 09:59 +0000, Gerd Petermann wrote:
> Hi Ticker,
> 
> why do you think that this forced closing is needed? Do we have code
> that relies on this?
> 
> Gerd
> 
> ________________________________________
> Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag
> von Ticker Berkin <rwb-mkgmap at jagit.co.uk>
> Gesendet: Donnerstag, 25. März 2021 10:47
> An: Development list for mkgmap
> Betreff: Re: [mkgmap-dev] line/polygon filters fix
> 
> 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
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


More information about the mkgmap-dev mailing list