Index: src/uk/me/parabola/mkgmap/build/MapBuilder.java
===================================================================
--- src/uk/me/parabola/mkgmap/build/MapBuilder.java	(revision 4909)
+++ src/uk/me/parabola/mkgmap/build/MapBuilder.java	(working copy)
@@ -1243,34 +1243,35 @@
 		config.setLevel(div.getZoom().getLevel());
 		config.setHasNet(hasNet);
 
-		LayerFilterChain normalFilters = new LayerFilterChain(config);
-		LayerFilterChain keepParallelFilters = new LayerFilterChain(config);
+		List<MapFilter> activeFilters = new ArrayList<>();
 		DouglasPeuckerFilter dp = null;
 		if (enableLineCleanFilters && (res < 24)) {
-			MapFilter rounder = new RoundCoordsFilter();
-			MapFilter sizeFilter = new SizeFilter(MIN_SIZE_LINE);
-			normalFilters.addFilter(rounder);
-			normalFilters.addFilter(sizeFilter);
+			activeFilters.add(new RoundCoordsFilter());
+			activeFilters.add(new SizeFilter(MIN_SIZE_LINE));
 			double errorForRes = dpFilterLineResMap.ceilingEntry(res).getValue();
 			if(errorForRes > 0) {
 				dp = new DouglasPeuckerFilter(errorForRes);
-				keepParallelFilters.addFilter(dp);
 			}
-			keepParallelFilters.addFilter(rounder);
-			keepParallelFilters.addFilter(sizeFilter);
 		}
-		RemoveObsoletePointsFilter removeObsolete = new RemoveObsoletePointsFilter();
-		normalFilters.addFilter(removeObsolete);
-		keepParallelFilters.addFilter(removeObsolete);
+		activeFilters.add(new RemoveObsoletePointsFilter());
 		if (dp != null)
-			normalFilters.addFilter(dp);
-		for (MapFilter filter : Arrays.asList(
+			activeFilters.add(dp);
+		activeFilters.addAll(Arrays.asList(
 				new RemoveEmpty(),
-				new LineSplitterFilter(), 
+				new LineSplitterFilter(), // this must come after the optimising filters
 				new LinePreparerFilter(div), 
-				new LineAddFilter(div, map))) {
+				new LineAddFilter(div, map)));
+		
+		// two different filter chains, one runs the DouglasPeucker filter first 
+		// this is believed to improve rendering of parallel lines
+		LayerFilterChain normalFilters = new LayerFilterChain(config);
+		LayerFilterChain keepParallelFilters = new LayerFilterChain(config);
+		if (dp != null)
+			keepParallelFilters.addFilter(dp);
+		for (MapFilter filter : activeFilters) {
 			normalFilters.addFilter(filter);
-			keepParallelFilters.addFilter(filter);
+			if (filter != dp)
+				keepParallelFilters.addFilter(filter);
 		}
 		
 		for (MapLine line : lines) {
