boundary relations duplicated by splitter, not merged by mkgmap

I am not sure if this is a splitter or mkgmap bug. In my map generated from Geofabrik's finland.osm.bz2, in the national border between Finland and Sweden, the name Sverige (name:sv for Sweden) occurs three times, apparently once per map tile. In the *.osm.gz files output by splitter, only the relation 52822 has name=Sweden, and that relation does occur in every *.osm.gz tile file. In the generated gmapsupp.img, the name occurs in two labels, like this: SVERIGE/SVERIGE/SVERIGE/NORRA NORRLAND/NORRA NORRLAND/NORRA NORRLAND/NORRBOTTENS LÄN/NORRBOTTENS LÄN/NORRBOTTENS LÄN/SUOMI SVERIGE/SVERIGE/NORRA NORRLAND/NORRA NORRLAND/NORRBOTTENS LÄN/NORRBOTTENS LÄN/SUOMI For some reason, the second occurrence is apparently only using two of the tiles. The desired label would mention each area only once. Would it be possible for mkgmap to merge relations between input tiles, if each carries the same id? A quick-and-dirty solution might be a not-substring filter that would not append the relation name to the mkgmap:boundary_name in the relations file if it is already contained. But I am wondering if the duplicate relations could be causing other problems. Best regards, Marko

Hi
In my map generated from Geofabrik's finland.osm.bz2, in the national border between Finland and Sweden, the name Sverige (name:sv for Sweden) occurs three times, apparently once per map tile. In the *.osm.gz files output by splitter, only the relation 52822 has name=Sweden, and that relation does occur in every *.osm.gz tile file.
In the generated gmapsupp.img, the name occurs in two labels, like this:
SVERIGE/SVERIGE/SVERIGE/NORRA NORRLAND/NORRA NORRLAND/NORRA NORRLAND/NORRBOTTENS LÄN/NORRBOTTENS LÄN/NORRBOTTENS LÄN/SUOMI SVERIGE/SVERIGE/NORRA NORRLAND/NORRA NORRLAND/NORRBOTTENS LÄN/NORRBOTTENS LÄN/SUOMI
I'm not sure I understand what you are describing here. The subject implies that the problem is with splitter, but I'm not so sure from the rest of the description. Splitter should place a one copy of a relation in each tile that contains an element that is referenced by that relation. If it is placing more than one copy in a tile that would be a splitter bug, whereas if the relation occuring in two different tiles is somehow causing interference between the tiles, that would be a mkgmap bug. It looks like the relation with the name Sverige is repeated three times in one .osm file, or alternatively the relation contains the same way three times. That could be a splitter bug or even a bug in the original data. If, when you compile each .osm file separately and then join them into a gmapsupp you get different results to when you do everything with the one command, then it might be a mkgmap bug. I'd probably have to see the files if none of that seems to apply. ..Steve

Hi Steve,
In my map generated from Geofabrik's finland.osm.bz2, in the national border between Finland and Sweden, the name Sverige (name:sv for Sweden) occurs three times, apparently once per map tile. In the *.osm.gz files output by splitter, only the relation 52822 has name=Sweden, and that relation does occur in every *.osm.gz tile file.
In the generated gmapsupp.img, the name occurs in two labels, like this:
SVERIGE/SVERIGE/SVERIGE/NORRA NORRLAND/NORRA NORRLAND/NORRA NORRLAND/NORRBOTTENS LÄN/NORRBOTTENS LÄN/NORRBOTTENS LÄN/SUOMI SVERIGE/SVERIGE/NORRA NORRLAND/NORRA NORRLAND/NORRBOTTENS LÄN/NORRBOTTENS LÄN/SUOMI
I'm not sure I understand what you are describing here.
The subject implies that the problem is with splitter, but I'm not so sure from the rest of the description.
The bug is either in splitter or mkgmap. With finland.osm.bz2 from Dec 26 (the first one was Dec 23), the labels in gmapsupp.img are a little different: SVERIGE/SUOMI SVERIGE/SUOMI SVERIGE/NORRA NORRLAND/NORRBOTTENS LÄN/SUOMI SVERIGE/SUOMI SVERIGE/NORRA NORRLAND/NORRA NORRLAND/NORRA NORRLAND/NORRBOTTENS LÄN/NORRBOTTENS LÄN/NORRBOTTENS LÄN/SUOMI SVERIGE/NORRA NORRLAND/NORRA NORRLAND/NORRBOTTENS LÄN/NORRBOTTENS LÄN/SUOMI There were no labels containing /SVERIGE. In the individual .img files, I can see the following labels: 63240001.img: SVERIGE/SUOMI 63240002.img: SVERIGE/SUOMI 63240003.img: SVERIGE/NORRA NORRLAND/NORRBOTTENS LÄN/SUOMI SVERIGE/SUOMI SVERIGE/NORRA NORRLAND/NORRA NORRLAND/NORRA NORRLAND/NORRBOTTENS LÄN/NORRBOTTENS LÄN/NORRBOTTENS LÄN/SUOMI SVERIGE/NORRA NORRLAND/NORRA NORRLAND/NORRBOTTENS LÄN/NORRBOTTENS LÄN/SUOMI The duplicate names only occur in 63240003.img, the only tile containing a land border between Finland and Sweden: 63240003: 3020800,890880 to 3266560,1472512 # : 64.819336,19.116211 to 70.092773,31.596680
It looks like the relation with the name Sverige is repeated three times in one .osm file, or alternatively the relation contains the same way three times. That could be a splitter bug or even a bug in the original data.
Right, it could be in the original too. I was suspecting the tools, because there are quite a few ????/???? in the Finnish/Russian border too. On a closer look, the ????s seem to be of different length (city/province/country in Cyrillic, I suppose). In 63240003.osm.gz, <relation id='52822'> does not contain duplicate members. Can you check the files? My scripts are at http://www.polkupyoraily.net/osm/. Best regards, Marko

Hi Steve,
It looks like the relation with the name Sverige is repeated three times in one .osm file, or alternatively the relation contains the same way three times. That could be a splitter bug or even a bug in the original data.
When I build the map with only two tiles, fewer buggy labels will be generated for the Swedish border: SVERIGE/NORRA NORRLAND/NORRA NORRLAND/NORRBOTTENS LÄN/NORRBOTTENS LÄN/SUOMI SVERIGE/NORRA NORRLAND/NORRA NORRLAND/NORRA NORRLAND/NORRBOTTENS LÄN/NORRBOTTENS LÄN/NORRBOTTENS LÄN/SUOMI Note 3 copies of NORRA NORRLAND and NORRBOTTENS LÄN, even though there are only two tiles now. The Swedish border http://www.openstreetmap.org/browse/relation/52822 has been last edited on Dec 24. The provincial relations are http://www.openstreetmap.org/browse/relation/52824 (Norrbottens län) http://www.openstreetmap.org/browse/relation/52828 (Norra Norrland) I just added some name:* translations to the relations. Other than that, the last changes were on Dec 4 (id:52828) and Dec 22 (id:52824). The data seems to be buggy, after all: id:52824 contains duplicates for ways 43024656, 44089880 id:52828 contains duplicates for way 43024656 Sorry for the noise. I will remove the duplicates from the data. This was one more triumph for mkgmap's validation capabilities. Marko
participants (2)
-
Marko Mäkelä
-
Steve Ratcliffe