Hi Ticker,
thanks for the patch. Some unit tests need changes. Please check if my changes
are plausible. Something might be wrong on my system because SimpleRouteTest
failed also without your patch.
Gerd
________________________________________
Von: mkgmap-dev <[email protected]> im Auftrag von Ticker
Berkin <[email protected]>
Gesendet: Freitag, 2. Juni 2023 17:47
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] Error processing tile
Hi Gerd & Carlos
I've found the problem and attach a patch which reduces the Subdivision
line limit to 254.
Subdivisions/areas have a set of limits, one of which was <= 255 lines.
These lines can be of any type including roads. When --route, a
reference to each line/road part is created, but these are numbered
from 1, so the 255th line in a SubDivision is numbered 256 as a road
segment and this can't be represented as a byte in the NET structures.
It looks like this problem has always been there, but is most likely to
manifest itself in areas with mostly roads.
Ticker
Index: src/uk/me/parabola/mkgmap/build/MapSplitter.java
===================================================================
--- src/uk/me/parabola/mkgmap/build/MapSplitter.java (revision 4907)
+++ src/uk/me/parabola/mkgmap/build/MapSplitter.java (working copy)
@@ -48,7 +48,7 @@
// The maximum number of lines. NET points to lines in subdivision
// using bytes.
- public static final int MAX_NUM_LINES = 0xff;
+ public static final int MAX_NUM_LINES = 0xff-1; //
Subdivision/RoadDef/RoadIndex number from 1
public static final int MAX_NUM_POINTS = 0xff;
Index: test/func/SimpleTest.java
===================================================================
--- test/func/SimpleTest.java (revision 4907)
+++ test/func/SimpleTest.java (working copy)
@@ -69,7 +69,7 @@
assertEquals("number of points at level 0", 204, list.size());
List<Polyline> list1 = mr.linesForLevel(0);
- assertEquals("number of lines at level 0", 3289, list1.size());
+ assertEquals("number of lines at level 0", 3290, list1.size());
}
@Test
Index: test/func/route/SimpleRouteTest.java
===================================================================
--- test/func/route/SimpleRouteTest.java (revision 4907)
+++ test/func/route/SimpleRouteTest.java (working copy)
@@ -58,7 +58,7 @@
count++;
System.out.println("TRE size " + size);
// Size varies depending on svn modified status
- assertThat("TRE size", size, new
RangeMatcher(1414, 2));
+ assertThat("TRE size", size, new
RangeMatcher(1426, 2));
break;
case "LBL":
count++;
_______________________________________________
mkgmap-dev mailing list
[email protected]
https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev