[mkgmap-dev] [PATCH v4] - alpha patch to support road find by name
From Marko Mäkelä marko.makela at iki.fi on Sun Mar 15 21:50:45 GMT 2009
On Sun, Mar 15, 2009 at 08:34:32PM +0000, Mark Burton wrote: > > v4 - Now sorts city info - unfortunately, something's not right with > the city info because if you try and enter a city name it says "not > found" as soon as enter a letter. But if you cancel the search you can > then scroll through the list of city names and select one. That's > weird. Especially because the normal incremental search for cities > works OK. The intersection search works for me (Edge 705), even without selecting a city name. (Vantaa would be quite at the bottom of the list of all Finnish cities, towns, suburbs and villages.) The street name search apparently wants to know the street number before starting the search. Entering "1" works (and shows the wrong end for a nearby street that doesn't have street numbers in the OSM database). The search for "1 Sorvapolku" (again, without selecting a city) returns three matches, all for the same highway=cycleway that happens to have a name. The way consists of three sections because of a motorway underpass (tunnel). It might be a good idea to merge such ways if possible, when forming the street name database. Similarly, "1 Ahjokatu" returns 6 matches, all in Lohikoski, FIN. "1 Otakaari" finds 7 matches, 6 in "Otaniemi, FIN" and 1 in "Teekkarikylä, FIN". (Teekkarikylä is what the student village is called at the Helsinki University of Technology. The whole campus area is called Otaniemi.) However, if I select the city "Espoo, FIN" (which Otaniemi and Teekkarikylä are in), no matches will be found. Furthermore, even if I select a city, the selection of city names will apparently offer me all street names of Finland, not those in the city. > As for the number field, I haven't thought yet how that would get its > data. Have you figured out where and how to store the street number information in the image file? > + public int compareTo(Object other) { > + City o = (City)other; > + if(o == this) > + return 0; > + if(label != null && o.label != null) > + return label.compareTo(o.label); // I'd do this: // define the null label as the smaller one if (label != null) return 1; if (o.label != null) return -1; // both labels are null: compare hashCode() return label.hashCode() - o.label.hashCode(); // instead of this: > + > + return 1; // not ordered, just different > + } > } Would the above suggestion fix the sorting of the city list? The patch doesn't seem to break anything for me. I can still generate finland.osm.bz2, and routing still works. Marko
- Previous message: [mkgmap-dev] [PATCH v4] - alpha patch to support road find by name
- Next message: [mkgmap-dev] [PATCH v4] - alpha patch to support road find by name
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list