logo separator

[mkgmap-dev] Patch proposal for maxspeed reading

From Nakor nakor.wp at gmail.com on Sat Sep 12 00:46:14 BST 2009

Hello,

Currently if maxspeed=45 mph (with a space between the number and mph), 
mkgmap fails to read the maxspeed correctly. Below is a proposed patch 
to solve that issue.

Thanks,

  N.

Index: src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java    (revision 
1182)
+++ src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java    (working 
copy)
@@ -1168,7 +1168,7 @@
        
         if(speedTag.matches(".*mph")) // Check if it is a limit in mph
         {
-            speedTag = speedTag.replaceFirst("mph", "");
+            speedTag = speedTag.replaceFirst(" *mph", "");
             factor = 1.61;
         }
         else





More information about the mkgmap-dev mailing list