Hi Gerd

Here is a slight enhancement to low-res-opt RemoveObsolete. It is
possible that this case (a b c c b a) will never happen because "c"
will probably be de-duped.

Ticker
 
Index: src/uk/me/parabola/mkgmap/filters/RemoveObsoletePointsFilter.java
===================================================================
--- src/uk/me/parabola/mkgmap/filters/RemoveObsoletePointsFilter.java	(revision 4780)
+++ src/uk/me/parabola/mkgmap/filters/RemoveObsoletePointsFilter.java	(working copy)
@@ -139,8 +139,10 @@
 				if (lenDup > newPoints.size() - 1 - lenDup)
 					break;
 			}
-			if (lenDup > 1 ) {
+			if (lenDup > 1) {
 				// line starts and ends with the same sequence of points, remove one sequence
+				if (lenDup + lenDup == newPoints.size())  // a b c c b a
+					lenDup++;
 				newPoints = newPoints.subList(0, newPoints.size() + 1 - lenDup);
 			}
 		}
_______________________________________________
mkgmap-dev mailing list
[email protected]
https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to