Address search confused by place=* with name,ref

I had not tested the map on my Garmin Edge 705 for a long time, so I do not know how long ago this got changed. Now I tested with a recent mkgmap trunk. It could be the revision right before the mergeroads branch was merged. After the merge, I got some strange error and no *.img files. In the address search, I have 3 regions to choose from: Finland, Åland islands, or Russian Federation. When I select Finland, I see 3 places at the top of the list: "10 Tykkimäki", "611 Pornainen" and "732 Salla". To see where these come from, I loaded the output of the following to JOSM: osmosis --rb finland.osm.pbf --tf reject-relations --tf reject-ways \ --tf accept-nodes 'place=*' --wx finland-place.osm It turns out that there are a few more place=* nodes with name&ref set, but the rest seem to use Roman numerals or be outside of my map tiles (near the country border). Searching for "X" finds "Xi:xii Kyttälä, FIN", which is ref="XI;XII". Searching for "I" finds a few more suburbs in Tampere. The real issue is that searching for "Tykkimäki" or any prefix for it will not find the "10 Tykkimäki". How could this be fixed (index the entry with both "$ref $name" and "$name")? Could the ref=* of a place be omitted from the address search? I suppose that I would get slightly different results, for ref=* in boundary=administrative relations, if I used something else than --location-autofill=nearest. I think that many boundary=administrative relations would carry the ref= of the municipality or suburb. These ref numbers are really nerdy stuff, you can at most find them on some government forms, never in street signs. Best regards, Marko

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Marko, for me it sounds like a bug in OSM, which should be fixed. Henning -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (MingW32) iQEcBAEBAgAGBQJSuUlfAAoJEPFgsWC7jOeTijoIAMrkT79PM51nJyrieyykpFNg xqOsWeb7UEbcgP4+IK6aX1RL1ncxFITtIaMlnbxJCevCYMFe/3jV4Ryyy9ZjyPNe QyVe46lWT3oEu3XqzlQm+wwTXTbZZ2NCLaXkNZbQUGaGPcXnuR1RNHnG7k4eGb2w 6ERj11G8POux3oh0coLNqnCgpLVZlEiRBRVRVvi/BlkUPHZ4aqz854bVHmwvxvmb /09QPb7xBNJEE+tgREGtuuIn+GJknhzP2nIobBphd+ZGqfLxYFbp3XZMyH48h76/ GJUgIxj/un6p2gS8cFxXO5O1Tb727VxfkTQWwf+Wi5MR5lSyxHhR5bG3w5BEVow= =Q6Xr -----END PGP SIGNATURE-----

On Tue, Dec 24, 2013 at 09:44:15AM +0100, Henning Scholland wrote:
for me it sounds like a bug in OSM, which should be fixed.
What is the bug in OSM data? That the ref=* should be attached to the boundary=administrative instead of the place=town? I guess I should try with precompiled bounds. The 3-digit refs are the official reference codes for municipalities. I I guess that the ref could be longer, consisting of proper NUTS and LAU prefixes. For example, the ref=10 for Tykkimäki (a part of Kouvola) could be some kind of a suburb or village code. Best regards, Marko

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Marko, if you find something like "Xi:xii Kyttälä, FIN" in a name-tag, then this shoulod be wrong for a town. The name of the town would be "Kyttälä", or am I wrong? Henning -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (MingW32) iQEcBAEBAgAGBQJSuhNXAAoJEPFgsWC7jOeTUQkH/178+7v+PHBIUK/gV/MrN8XE mobefCBQqc+LxLaq66orEUqxJm05+REZlHQ7xD8qUi/YrjjblGofg6gwH8/xrorj m6/xvqTA7cnMKCXweV0VKyM6P4UC8VJGbp7eZCNVJXrnoFot4Q7ElQYrqC327lUH QP+TIl72+OW8BizP3h6Tmw/o28htduyqM6FCupITuWChzbFSOBdqhy4tkXMsBR06 TQQIT/JV3cDzp8hucOBeP3/weR0ba1/Opz/sr2rXc3bsmIipXlE1LdFsw7WvbP9O HlYSAnVnEBGfG0aouRFGyPZeBT4aLy7h2UQDaP19bD+YXXaMQASs+yXnUiqaY68= =Owuy -----END PGP SIGNATURE-----

On Wed, Dec 25, 2013 at 12:05:59AM +0100, Henning Scholland wrote:
if you find something like "Xi:xii Kyttälä, FIN" in a name-tag, then this shoulod be wrong for a town. The name of the town would be "Kyttälä", or am I wrong?
The tags of node 2129650976 are: "ref"="XI;XII" "source"="Bing" "place"="suburb" "name"="Kyttälä" I think that this is an error of mkgmap instead of an error in the source data. The place=* ref is not something that you would normally see anywhere; therefore it should not be included in the mkgmap translated label. I do not see an error in the source data, other than the ref of the suburb not being fully qualified (it should start with NUTS and LAU references that qualify the city of Tampere). BTW, the place=city of Tampere (node 30969480) is lacking ref. It is in role admin_centre of two boundaries (admin_level 8 for the city and 6 for the province of Pirkanmaa). The latter relation does have ref=FI197, but there is no ref for the city relation. Marko

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Marko, ok so I misunderstood you. You wrote something of filtering osm.pbf with osmosis and afterwards there were elemets with name "Xi:xii Kyttälä, FIN". But as you explained now, mkgmap creates this name. So I agree with you: Your given name shouldn't be generated by mkgmap. Henning -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (MingW32) iQEcBAEBAgAGBQJSusJBAAoJEPFgsWC7jOeTpMsH/0hMujyRuYMbjiUa6KEIfd6t b1jUeYW+Bqocuc5tJ3GhD14kHY9UbuGVIl4oqW690jGMmaArg14WJve/tuClDWFI nt1DxZkFIv7PsRhWb8w3RVwiTkjzhmL11gKOqUjzqk+8kYdcHI53Jyf1XAsE2Qt6 qatPaNb0LosyxM7okMntHIeeiBTTkHV2xekupWaatLkzaVGHN6jLNlFW26fWDec6 FUIikTZ7g8Z6SlQZfYZAQIt562k8F8X/DZ6G7P71pYIe4bx1mF4P3gTyqj9AwdD9 b9paGnFkt1Ftc/w1+thd8LyixqAwtuRCgAyoCyqyE1qYoX7F5QpvM+ELL8Ej3ZI= =TCeO -----END PGP SIGNATURE-----

On Wed, Dec 25, 2013 at 12:32:17PM +0100, Henning Scholland wrote:
ok so I misunderstood you. You wrote something of filtering osm.pbf with osmosis and afterwards there were elemets with name "Xi:xii Kyttälä, FIN".
The only thing I did with Osmosis was troubleshooting. I filtered all place=* nodes with Osmosis so that I was able to load the relevant part of finland.osm.pbf to JOSM to see what is going on. The map is generated straight from finland.osm.pbf with splitter and mkgmap using the default style. The only 'hack' in my osm2img.sh is the assignment of tile borders in a way that avoids 'drying' the Baltic sea. (For the tile near the twin city Haparanda/Torneå/Tornio on the Swedish-Finnish border, I am passing --generate-sea=multipolygon,extend-sea-sectors. Other tiles use plain --generate-sea=multipolygon.)
But as you explained now, mkgmap creates this name. So I agree with you: Your given name shouldn't be generated by mkgmap.
Thanks! I guess I should have been more explicit. Marko

Hi, using ref tag for name is programmed in default style, see file inc\name. I think you can correct it in file points, moving line "include inc\name" after definitions for tag "place". -- Best regards, Andrzej

On Wed, Dec 25, 2013 at 02:02:00PM +0100, Andrzej Popowski wrote:
using ref tag for name is programmed in default style, see file inc\name. I think you can correct it in file points, moving line "include inc\name" after definitions for tag "place".
Right, this would fix the problem for place=*. But, before fixing that, I would like to ensure that the boundary=administrative relations are working in a similar way. I guess that the inc/names is not such a good idea for other than commercial POIs (shops, fuel stations, anything with a fee). The ref=* does make sense for roads, but operator=* (such as the maintenance operator) or brand=* probably do not. However, there is no problem for roads in the default style, because the 'lines' file is not referring to inc/names. In Finland, street names are supposed to be unique within a municipality or city (admin_level=8). So, for the address index it would be best to only use the 'city' name from the boundary relations, and to ignore any suburbs or city parts. If I now search for Vantaa, I will find some streets located in the city. Other streets would have to be sought in city parts such as Vantaanportti and Vantaanlaakso. Hardly anybody would know all the city parts. While the suburb or city part borders are useless for address search, they could still be interesting on the map display, because the Finnish 'cities' typically contain many 'towns' separated by large areas of nearly uninhabited farmland or forest. Another issue is that the boundary naming rule in styles/default/relations does not seem to have any effect any more. The boundary lines near my home are only listing one of the relation 'owners' instead of showing all names that were added to mkgmap:boundary_name. The lines used to list all municipal or provincial borders (e.g., Kerava/Sipoo/Helsingin seutukunta/Itä-Uusimaa/whatnot). Now only one name is being shown at random. On the Finnish/Russian border, that name is 'Suomi' (Finland in Finnish) for a few sections of the border, but many sections have some transliterated label from some Russian boundary=administrative relation. I wonder if it would be possible to define up to 4 labels for an administrative border, like for streets. If it is possible to show only one label for a border, it should be that of the municipality ('city'), not smaller (suburb or village) or bigger (province, state or country, if the municipality happens to be on a provincial border). I think that it could make sense to define separate lines for interstate or international borders (so that the major border could be overlapped with a lesser border that belongs to the municipality or province bounded by the same line). Best regards, Marko
participants (3)
-
Andrzej Popowski
-
Henning Scholland
-
Marko Mäkelä