v3 - now works harder to clean up road names for use in MDR file - not
sure if this will have a beneficial effect but it could possibly fix
the issue recently reported by Felix.

Motorways are still not showing up.

-------

v2 - remove more duplicate labels that only differ in letter case -
remove leading spaces from labels even if they start with a Garmin code.

Still something wrong with motorway names because on the UK map, only
the M74 appears in the mapsource road names - all other motorways are
missing - very odd.

-------

This patch codes around the problems introduced by highway
shields with regard to the sorted roads:

1 - the sort order should now be much improved

2 - no duplicate symbols (shield version + non-shield version)

It also includes a fix to the label reading code so that labels with a
highway shield prefix are read in correctly when generating the MDR
file.

For me, in mapsource, road search for roads with highway shields now
works apart from motorways which don't seem to searchable - perhaps
that's deliberate on Garmin's part?


All feedback appreciated.

Mark
diff --git a/src/uk/me/parabola/imgfmt/app/mdr/MDRFile.java b/src/uk/me/parabola/imgfmt/app/mdr/MDRFile.java
index bcb1867..7b2cff8 100644
--- a/src/uk/me/parabola/imgfmt/app/mdr/MDRFile.java
+++ b/src/uk/me/parabola/imgfmt/app/mdr/MDRFile.java
@@ -148,11 +148,7 @@ public class MDRFile extends ImgFile {
 	 * @return The name as it will go into the index.
 	 */
 	private String cleanUpName(String name) {
-		// TODO Currently just drop an initial shield, but more to do
-		if (name.charAt(0) < ' ')
-			return name.substring(1);
-		
-		return name;
+		return Label.stripGarminCodes(name);
 	}
 
 	public void write() {
_______________________________________________
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to