logo separator

[mkgmap-dev] Commit: r1621: Add --min-line-size and --min-polygon-size options.

From Felix Hartmann extremecarver at googlemail.com on Tue Mar 23 21:22:55 GMT 2010

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 at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>    




More information about the mkgmap-dev mailing list