[mkgmap-dev] uncommitted patches for mkgmap
From WanMil wmgcnfg at web.de on Mon Feb 18 20:00:42 GMT 2013
Great, Thanks! I am looking forward for more improvements in the filter chain. WanMil > Hi WanMil, > > thanks for the propsals. I've changed the code and committed it. > I kept the extra lines for the spike detection but moved them > to the beginning. You are right that the area test would detect > that as well, but this test is much simpler. > > Gerd > P.S. The change in the order of points was indeed not intended. > > > WanMil wrote >> Hi Gerd, >> >> filter_shapes_v1.patch: >> I did not test it but I made a little code review. That looks good. >> Anyhow I have some comments: >> >> You want to filter shapes only? (The comments also talk about filtering >> lines). >> When working with shapes only I think in the end of the doFilter method >> it should better be >> if (newPoints.size() > 3) >> ... >> instead of newPoints.size() > 1. >> >> Maybe it's also better for quick understanding to cast to MapShape only >> instead of working with a MapLine line object. >> >> I stumbled a bit on the following part: >> int last = newPoints.size()-1; >> areaTest[0] = newPoints.get(last); >> areaTest[1] = newPoints.get(last-1); >> areaTest[2] = newP; >> It is correct but for a better reading I would leave the points in the >> original order: >> int last = newPoints.size()-1; >> areaTest[0] = newPoints.get(last-1); >> areaTest[1] = newPoints.get(last); >> areaTest[2] = newP; >> >> I wonder if the following part is required: >> if (newPoints.get(newPoints.size()-2).equals(newP)){ >> // detected simple spike >> newPoints.remove(newPoints.size()-1); >> continue; >> } >> I think the simple spike is also covered with the area==0 test? >> >> Maybe you could introduce a boolean flag if anything was changed by the >> filter and create a new object only if that's true. Otherwise each shape >> is recreated. >> >> WanMil >> >> >>> Hi, >>> >>> I got no feedback on these posts regarding patches: >>> >>> http://gis.19327.n5.nabble.com/Why-do-we-have-the-Area-too-small-to-split-at-message-tp5744612p5745299.html >>> >>> http://gis.19327.n5.nabble.com/PATCH-v1-Optimize-filters-for-shapes-tp5744144p5745401.html >>> >>> I used both of them and I think they are ok. Is it okay to commit them? >>> >>> Gerd >>> >>> >>> >>> -- >>> View this message in context: >>> http://gis.19327.n5.nabble.com/uncommitted-patches-for-mkgmap-tp5749600.html >>> Sent from the Mkgmap Development mailing list archive at Nabble.com. >>> _______________________________________________ >>> mkgmap-dev mailing list >>> > >> mkgmap-dev at .org > >>> http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev >>> >> >> _______________________________________________ >> mkgmap-dev mailing list > >> mkgmap-dev at .org > >> http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > > > > > > -- > View this message in context: http://gis.19327.n5.nabble.com/uncommitted-patches-for-mkgmap-tp5749600p5749692.html > Sent from the Mkgmap Development mailing list archive at Nabble.com. > _______________________________________________ > mkgmap-dev mailing list > mkgmap-dev at lists.mkgmap.org.uk > http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev >
- Previous message: [mkgmap-dev] uncommitted patches for mkgmap
- Next message: [mkgmap-dev] uncommitted patches for mkgmap
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list