Commit: r1621: Add --min-line-size and --min-polygon-size options.

Version 1621 was commited by markb on 2010-03-23 09:07:10 +0000 (Tue, 23 Mar 2010) Add --min-line-size and --min-polygon-size options. Allow the user to specify the minimum size of line and polygon features. Features smaller than that at a given zoom level are dropped. The defaults are 1 for lines and 8 for polygons. Based on a patch supplied by Felix Hartmann.

On 23.03.2010 10:07, svn commit wrote:
Version 1621 was commited by markb on 2010-03-23 09:07:10 +0000 (Tue, 23 Mar 2010)
Add --min-line-size and --min-polygon-size options.
Allow the user to specify the minimum size of line and polygon features. Features smaller than that at a given zoom level are dropped.
The defaults are 1 for lines and 8 for polygons.
Based on a patch supplied by Felix Hartmann. _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Could it be that the new for polygons "8" is much much bigger compared to the old (using patch) "8"??? Or that the patch was not enacted on resolution 24??

On 23.03.2010 21:45, Mark Burton wrote:
Hello Felix,
Could it be that the new for polygons "8" is much much bigger compared to the old (using patch) "8"??? Or that the patch was not enacted on resolution 24??
Err, why?
Mark _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Just again, I think your implementation really broke something. Using: --min-polygon-size=1 I still miss loads of houses (that are at least 5-10 pixel big). --min-polygon-size=200 makes maps still smaller and missing lotta more polygons, so in principle this option is working (and syntax correct).

Felix,
Or that the patch was not enacted on resolution 24??
Yes, that's true and looking at the code, I think that for polygons it probably should always be done and, furthermore, should be done after the polygon splitting so that any tiny polygons produced by the splitting get removed. i.e. it should look like this, perhaps: diff --git a/src/uk/me/parabola/mkgmap/build/MapBuilder.java b/src/uk/me/parabola/mkgmap/build/MapBuilder.java index c2593c6..28098ee 100644 --- a/src/uk/me/parabola/mkgmap/build/MapBuilder.java +++ b/src/uk/me/parabola/mkgmap/build/MapBuilder.java @@ -930,13 +930,13 @@ public class MapBuilder implements Configurable { if (enableLineCleanFilters && (res < 24)) { filters.addFilter(new PreserveHorizontalAndVerticalLinesFilter()); filters.addFilter(new RoundCoordsFilter()); - filters.addFilter(new SizeFilter(minPolygonSize)); //DouglasPeucker behaves at the moment not really optimal at low zooms, but acceptable. //Is there an similar algorithm for polygons? if(reducePointError > 0) filters.addFilter(new DouglasPeuckerFilter(reducePointError)); } filters.addFilter(new PolygonSplitterFilter()); + filters.addFilter(new SizeFilter(minPolygonSize)); filters.addFilter(new RemoveEmpty()); filters.addFilter(new ShapeAddFilter(div, map));

On 23.03.2010 21:56, Mark Burton wrote:
Felix,
Or that the patch was not enacted on resolution 24??
Yes, that's true and looking at the code, I think that for polygons it probably should always be done and, furthermore, should be done after the polygon splitting so that any tiny polygons produced by the splitting get removed. i.e. it should look like this, perhaps:
Well as when that patch was written, the optimum would be adjustable drop sizes based on resolution. Here would be my optimal settings for polygons: 24:2 23:4 22:8 21:12-16 (unsure, would need some experimentation) 20:20-30 19:40-80 As for lines, it should never be done on 24 for routbable lines (else routing gets broken). For other resolutions I have not yet experimented with it.
diff --git a/src/uk/me/parabola/mkgmap/build/MapBuilder.java b/src/uk/me/parabola/mkgmap/build/MapBuilder.java index c2593c6..28098ee 100644 --- a/src/uk/me/parabola/mkgmap/build/MapBuilder.java +++ b/src/uk/me/parabola/mkgmap/build/MapBuilder.java @@ -930,13 +930,13 @@ public class MapBuilder implements Configurable { if (enableLineCleanFilters&& (res< 24)) { filters.addFilter(new PreserveHorizontalAndVerticalLinesFilter()); filters.addFilter(new RoundCoordsFilter()); - filters.addFilter(new SizeFilter(minPolygonSize)); //DouglasPeucker behaves at the moment not really optimal at low zooms, but acceptable. //Is there an similar algorithm for polygons? if(reducePointError> 0) filters.addFilter(new DouglasPeuckerFilter(reducePointError)); } filters.addFilter(new PolygonSplitterFilter()); + filters.addFilter(new SizeFilter(minPolygonSize)); filters.addFilter(new RemoveEmpty()); filters.addFilter(new ShapeAddFilter(div, map)); _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
participants (3)
-
Felix Hartmann
-
Mark Burton
-
svn commit