
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.
You cannot route over polygons. So I don't expect that removing a point from a polygon can 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 ?
Probably not. Otherwise the file size of the img files should have been 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. WanMil
Gerd