
Hi, while working on the mp_cut branch I observed that some of the filter have some potential for improvements when dealing with shapes. 1st change: The RemoveEmpty filter let all shapes pass with at least 3 points. But there must be at least 4 points (1st==last point) to define a shape with a non zero area. 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. The img file size is reduced slightly (~1%) using this patch. 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 don't have time to do these improvements but maybe I could give some ideas what can be done. So if you anyone of you has time and fun to play with the filters just do it! Thanks WanMil