logo separator

[mkgmap-dev] [PATCH v1] Optimize filters for shapes

From Gerd Petermann gpetermann_muenchen at hotmail.com on Thu Jan 17 20:26:18 GMT 2013

Hi WanMil,

I've committed the change to the RemoveEmptyFilter, but not the change to RoundCoordsFilter.
After I added switch so that your change did not handle roads the effect was near zero.

Ciao,
Gerd

> Date: Sun, 13 Jan 2013 18:22:25 +0100
> From: wmgcnfg at web.de
> To: mkgmap-dev at lists.mkgmap.org.uk
> Subject: Re: [mkgmap-dev] [PATCH v1] Optimize filters for shapes
> 
> >  > >
> >  > > please check: the patch ignores preserved points, so I think it
> > could break
> >  > > routing.
> >  >
> >  > You cannot route over polygons. So I don't expect that removing a point
> >  > from a polygon can break routing?
> >
> > The filter is also used in MapBuilder.processLines()
> 
> You are right. I thought my patch checks if the element is a MapShape 
> like it is done in the RemoveEmpty. But it doesn't. So this has to be 
> added and/or be extended to check for preserved points.
> 
> >
> >  >
> >  > > I would assume that straight lines are filtered by
> > DouglasPeuckerFilter ?
> >  >
> >  > Probably not. Otherwise the file size of the img files should have been
> >  > the same.
> >
> > I don't understand. Your patch doesn't change the number of points
> > on straigth lines, does it?
> 
> No, but it removes spikes from polygons. So the following polygon:
> a-b-c-d-c-e-a
> will become
> a-b-c-e-a
> 
> I don't know if the DouglasPeuckerFilter does the same?
> 
> >
> >
> >  >
> >  > > (at least now that I've committed the removeShortArcs patch)
> >  > > I did already look for other algos, eg. the VW algo
> >  > > http://www2.dcs.hull.ac.uk/CISRG/publications/DPs/DP10/DP10.html
> >  > > sounds like a possible alternative to DouglasPeucker.
> >  > > On the other hand, I assume that the input for the filters will change
> >  > > with the intended mp_cut changes, so we may end up solving the same
> > problem
> >  > > at two different places.
> >  >
> >  > Yes and no. The mp_cut changes will only affect how polygons are cut
> >  > when they are part of a multipolygon. But there are many polygons that
> >  > are not.
> >  > On the other hand I also use the algorithm of the RoundCoordsFilter in
> >  > the mp_cut branch (not yet committed) and therefore observe exactly the
> >  > same problems. So improving the RoundCoordsFilter algo will also solve
> >  > problems in the mp_cut branch.
> >
> > OK. The RoundCoordsFilter really looks a bit brutal ;-)
> >
> > Gerd
> >
> 
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20130117/2fab3d79/attachment-0001.html 


More information about the mkgmap-dev mailing list