Hello,

I have noticed that in case an exit node is linked to several highways (maybe this is bad mapping practice but it exists) and one of them does not have a ref tag, mkgmap issues a warning that the exit was not assigned a ref (see nodes 62152165 and 61852851 for an example).

Below is an patch that tries to fix this:

Index: src/uk/me/parabola/mkgmap/reader/osm/xml/Osm5XmlHandler.java
===================================================================
--- src/uk/me/parabola/mkgmap/reader/osm/xml/Osm5XmlHandler.java    (revision 1246)
+++ src/uk/me/parabola/mkgmap/reader/osm/xml/Osm5XmlHandler.java    (working copy)
@@ -432,19 +432,21 @@
         for (Node e : exits) {
             String refTag = Exit.TAG_ROAD_REF;
             if(e.getTag(refTag) == null) {
+                String ref = null;
                 for (Way w : motorways) {
-                    String ref = w.getTag("ref");
                     if (w.getPoints().contains(e.getLocation())) {
-                        if(ref != null) {
-                            log.info("Adding " + refTag + "=" + ref + " to exit" + e.getTag("ref"));
-                            e.addTag(refTag, ref);
-                        }
-                        else {
-                            log.warn("Motorway exit is positioned on a motorway that doesn't have a 'ref' tag");
-                        }
-                        break;
+                      ref = w.getTag("ref");
+                        if(ref != null)
+                            break;
                     }
                 }
+                if(ref != null) {
+                    log.info("Adding " + refTag + "=" + ref + " to exit" + e.getTag("ref"));
+                    e.addTag(refTag, ref);
+                }
+                else {
+                    log.warn("Motorway exit is positioned on a motorway that doesn't have a 'ref' tag");
+                }
             }
         }
 



Thanks,

N.