
WanMil wrote
2nd change: The RoundCoordsFilter does not care if an area is rounded to a line which happens quite often. The patch tries to remove the line parts.
please check: the patch ignores preserved points, so I think it could break routing. WanMil wrote
Anyhow I think there is more improvement possible. I have attached two gpx files. Bye the way the patch contains some commented lines that creates the GPX files for each polygon treated by the patch. 11315_16_org.gpx is the input polygon to the RoundCoordsFilter and 11315_16.gpx is the result (using the patch).
Some possible improvements: * Straight lines sometimes contain more that one point and it should be easily possible to remove these additional points. * The filtered polygon sometimes still contains lines which are not removed by patch because the overlapping lines do not contain the same points. You can see this in the attached gpx in the upper middle of the right polygon block. * The filtered polygon could be simplified and sometimes split into more separate polygons which are now connected by a line. * Better resolution dependend filtering?
I would assume that straight lines are filtered by DouglasPeuckerFilter ? (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. Gerd -- View this message in context: http://gis.19327.n5.nabble.com/PATCH-v1-Optimize-filters-for-shapes-tp574414... Sent from the Mkgmap Development mailing list archive at Nabble.com.