logo separator

[mkgmap-dev] mkgmap-dev Digest, Vol 153, Issue 40 Resolution 23 raster problems

From Andrzej Popowski popej at poczta.onet.pl on Sun Apr 25 20:41:39 BST 2021

Hi Gerd,

I don't observe any significant differences in compilation. But to make 
it more optimized, we can put SizeFilter before DouglasPeuckerFilter. I 
have attached a second patch here.

There is a difference in results. See pictures with DouglasPeuckerFilter 
after RoundCoordsFilter and new version with DouglasPeuckerFilter 
before. This is for 22-bit resolution, so effects are probably more clear.

-- 
Best regards,
Andrzej

-------------- next part --------------
Index: src/uk/me/parabola/mkgmap/build/MapBuilder.java
===================================================================
--- src/uk/me/parabola/mkgmap/build/MapBuilder.java	(revision 4677)
+++ src/uk/me/parabola/mkgmap/build/MapBuilder.java	(working copy)
@@ -1188,10 +1188,10 @@
 		
 		LayerFilterChain filters = new LayerFilterChain(config);
 		if (enableLineCleanFilters && (res < 24)) {
-			filters.addFilter(new RoundCoordsFilter());
 			filters.addFilter(new SizeFilter(MIN_SIZE_LINE));
 			if(reducePointError > 0)
 				filters.addFilter(new DouglasPeuckerFilter(reducePointError));
+			filters.addFilter(new RoundCoordsFilter());
 		}
 		filters.addFilter(new LineSplitterFilter());
 		filters.addFilter(new RemoveEmpty());
@@ -1243,7 +1243,6 @@
 		LayerFilterChain filters = new LayerFilterChain(config);
 		filters.addFilter(new PolygonSplitterFilter());
 		if (enableLineCleanFilters && (res < 24)) {
-			filters.addFilter(new RoundCoordsFilter());
 			int sizefilterVal =  getMinSizePolygonForResolution(res);
 			if (sizefilterVal > 0)
 				filters.addFilter(new SizeFilter(sizefilterVal));
@@ -1251,6 +1250,7 @@
 			//Is there an similar algorithm for polygons?
 			if(reducePointErrorPolygon > 0)
 				filters.addFilter(new DouglasPeuckerFilter(reducePointErrorPolygon));
+			filters.addFilter(new RoundCoordsFilter());
 		}
 		filters.addFilter(new RemoveObsoletePointsFilter());
 		filters.addFilter(new RemoveEmpty());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: simply-after.jpg
Type: image/jpeg
Size: 22938 bytes
Desc: not available
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20210425/b2d75d7f/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: simply-before.jpg
Type: image/jpeg
Size: 24868 bytes
Desc: not available
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20210425/b2d75d7f/attachment-0003.jpg>


More information about the mkgmap-dev mailing list