
Hi Steve, here is a quick workaround for the sorting problem. Looks like the String compareTo functions provides the right sorting. Patch also contains change to the help for --add-pois-to-areas option suggested by Clinton Gladstone. Berni.
Hi Steve,
thanks for checking in this patch. Unfortunately I detected one more problem. It looks like the Nuvi doesn't like your new sorting of the city list. I must admit that I like your new sorting much cleaner then the old one. But it looks like the old sorting of the TreeMap was just by luck the right one. The nuvi seams to run a binary search on this list and fails to find some cities if the sort order is not perfect. It also leaves away the country info for such cities it can not find in the city list. I compared the old and the new sorting and played around with the Locale setting of the Collator but didn't found a setting that matches.
The new sort order seams to cut out whitespaces in names. The old one sorted space before A which was ok for the nuvi. The Germany Umlauts like Ä where sorted after Z now Ä cames after A which seams also not right for the nuvi.
It would be interesting which function TreeMap uses to sort strings ...
Thanks Berni.
svn commit schrieb:
Version 961 was commited by steve on 2009-03-02 21:32:49 +0000 (Mon, 02 Mar 2009) BRANCH: poi
Improve city detection in non-geodb countries.
- Bernhard Heibler
plus some formatting etc fixes _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Index: src/uk/me/parabola/imgfmt/app/lbl/PlacesFile.java =================================================================== --- src/uk/me/parabola/imgfmt/app/lbl/PlacesFile.java (revision 961) +++ src/uk/me/parabola/imgfmt/app/lbl/PlacesFile.java (working copy) @@ -175,11 +175,15 @@ Collections.sort(cityList, new Comparator<CitySort>() { public int compare(CitySort o1, CitySort o2) { - return o1.getKey().compareTo(o2.getKey()); + return o1.getKey().getSourceString().compareTo(o2.getKey().getSourceString()); + //return o1.getKey().compareTo(o2.getKey()); } }); for (CitySort cs: cityList) + { + //System.out.println(cs.getKey().getSourceString()); cs.getCity().setIndex(index++); + } } Zip createZip(String code) { Index: resources/help/en/options =================================================================== --- resources/help/en/options (revision 961) +++ resources/help/en/options (working copy) @@ -127,9 +127,9 @@ can be specified with this option. --add-pois-to-areas - Generate a POI for each area. The POIs are created after the style - is applied and only for polygon types that have a reasonable point - equivalent. + Generate a POI for each area. The POIs inherit the tags of the area + polygon, and are resolved according to the rules in the points style + file. --tdbfile Write a .tdb file.