[OSM-dev] [PATCH] make JOSM validator plugin ignore unnamed motorway_link

Dave Hansen dave at sr71.net
Fri Jun 1 23:10:16 BST 2007


The validator plugin likes to warn that highway=motorway_link ways are
unnamed.  I was under the impression that they aren't intended to be
named.  This patch makes these warnings go away.

-- Dave

Index: src/org/openstreetmap/josm/plugins/validator/tests/UntaggedWay.java
===================================================================
--- src/org/openstreetmap/josm/plugins/validator/tests/UntaggedWay.java	(revision 3089)
+++ src/org/openstreetmap/josm/plugins/validator/tests/UntaggedWay.java	(working copy)
@@ -35,10 +35,12 @@
 			numTags = tags.size();
 			for( String tag : allowedTags)
 				if( tags.containsKey(tag) ) numTags--;
-            
-            if( numTags != 0 && tags.containsKey("highway" ) )
+           
+			String highway = w.get("highway"); 
+            if( numTags != 0 && (highway != null))
             {
-                if( !tags.containsKey("name") && !tags.containsKey("ref") )
+				if( !highway.equals("motorway_link") &&
+                    !tags.containsKey("name") && !tags.containsKey("ref") )
                 {
                     boolean hasName = false;
                     for( String key : w.keySet())






More information about the dev mailing list