Hi,
I have decided to try simple solution for this problem. I have modified
addStreet() procedure in file imgfmt\app\mdr\MDRFile.java. While I don't
know all ramification of this change, search seems to work as expected,
see attached picture form Mapsource.
Attached patch is created half-manually, I hope it will work in your
environment.
--
Best regards,
Andrzej
--- src/uk/me/parabola/imgfmt/app/mdr/MDRFile.java Wed Jun 25 15:52:12 2014
+++ src/uk/me/parabola/imgfmt/app/mdr/MDRFile.java Thu Dec 04 22:17:15 2014
@@ -223,14 +223,28 @@
String name = lab.getText();
String cleanName = cleanUpName(name);
int strOff = createString(cleanName);
// We sort on the dirty name (ie with the Garmin shield
codes) although those codes do not
// affect the sort order. The string for mdr15 does not
include the shield codes.
mdr7.addStreet(currentMap, name, lab.getOffset(),
strOff, mdrCity);
+
+ // try substrings
+ for (;;) {
+ int spaceOff = name.indexOf(" ");
+ if (spaceOff < 0)
+ break;
+ name = name.substring(spaceOff +1);
+ name = name.trim();
+ if (name.length() <= 2)
+ break;
+ cleanName = cleanUpName(name);
+ strOff = createString(cleanName);
+ mdr7.addStreet(currentMap, name,
lab.getOffset(), strOff, mdrCity);
+ }
}
}
/**
* Remove shields and other kinds of strange characters. Perform any
* rearrangement of the name to make it searchable.
* @param name The street name as read from the img file.
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev