logo separator

[mkgmap-dev] Performance of mkgmap.jar and splitter.jar

From Mark Burton markb at ordern.com on Sat Apr 4 23:55:31 BST 2009

Hi Felix,

Can you please try this little patch and see if helps the performance
when generating the sorted road data.

Cheers,

Mark

------------------

diff --git a/src/uk/me/parabola/imgfmt/app/trergn/Polyline.java b/src/uk/me/parabola/imgfmt/app/trergn/Polyline.java
index cc5204b..d71f1f9 100644
--- a/src/uk/me/parabola/imgfmt/app/trergn/Polyline.java
+++ b/src/uk/me/parabola/imgfmt/app/trergn/Polyline.java
@@ -183,9 +183,10 @@ public class Polyline extends MapObject {
                if(s0.equals(e1) || e0.equals(s1) || s0.equals(s1) || e0.equals(e1))
                        return true;
                for(Coord p1 : points)
-                       for(Coord p2 : other.points)
-                               if(p1.equals(p2))
-                                       return true;
+                       if(p1.getId() != 0)
+                               for(Coord p2 : other.points)
+                                       if(p2.getId() != 0 && p1.equals(p2))
+                                               return true;
 
                return false;
        }



More information about the mkgmap-dev mailing list