Hi
Steve, do you have any idea where the problem might be located?
Well it might be that there should be separate city entries for each
region, as in attached patch.
The patch works for the given example, although I wouldn't be surprised
if it caused another problem somewhere else - but give it a go see what
happens!
..Steve
Index: src/uk/me/parabola/imgfmt/app/mdr/Mdr5.java
===================================================================
--- src/uk/me/parabola/imgfmt/app/mdr/Mdr5.java (revision 1870)
+++ src/uk/me/parabola/imgfmt/app/mdr/Mdr5.java (revision )
@@ -64,16 +64,18 @@
cities.clear();
int count = 0;
int lastMapId = 0;
+ int lastRegion = 0;
String lastName = null;
for (SortKey<Mdr5Record> key : sortKeys) {
Mdr5Record c = key.getObject();
- if (c.getMapIndex() != lastMapId || !c.getName().equals(lastName)) {
+ if (c.getMapIndex() != lastMapId || !c.getName().equals(lastName) || c.getRegionIndex() != lastRegion) {
count++;
c.setGlobalCityIndex(count);
cities.add(c);
lastName = c.getName();
lastMapId = c.getMapIndex();
+ lastRegion = c.getRegionIndex();
} else {
c.setGlobalCityIndex(count);
}
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev