
I have noticed some missing ways in my Garmin maps. I investigated, as follows. I downloaded the France extract from Geofabrik in .pbf format; used osmosis-0.37 to extract a bounding box, bottom=49.4 left=1.3 top=51.3 right=4.4; and ran splitter-r123 on the extract with max-nodes=1500000. This is the resulting areas.list: 63240001: 2301952,141312 to 2347008,206848 # : 49.394531,3.032227 to 50.361328,4.438477 63240002: 2301952,59392 to 2347008,141312 # : 49.394531,1.274414 to 50.361328,3.032227 63240003: 2347008,141312 to 2371584,190464 # : 50.361328,3.032227 to 50.888672,4.086914 63240004: 2347008,59392 to 2392064,141312 # : 50.361328,1.274414 to 51.328125,3.032227 I loaded each .osm.gz tile into JOSM in turn. This takes a few minutes, and JOSM is very slow until you zoom well in. It needs about 1GB memory. [This generated many thousands of messages on stderr, along the lines of "WARNING: Normalizing value of attribute 'version' of element 552,829,105 to 1, API version is '0.5'. Got 0." Why does splitter downgrade the API to v0.5?] I found that way 31799814 (79 nodes) was missing. This is a 57km section of the high-speed railway line between Lille and Paris. The way should have been split between tiles 63240002 and 63240004. The way is present in the file which was input to splitter. Why does the way go missing?

On Mon, Oct 18, 2010 at 06:15:29PM +0100, Adrian wrote:
I found that way 31799814 (79 nodes) was missing. This is a 57km section of the high-speed railway line between Lille and Paris. The way should have been split between tiles 63240002 and 63240004. The way is present in the file which was input to splitter. Why does the way go missing?
If I remember previous discussions correctly, splitter does not split lines exactly at the tile border, but instead it includes all nodes that are not too much outside the tile. An almost-straight long way can be drawn with few nodes. You could help the situation by adding a point to the line close to the splitting border. IIRC, I have done so somewhere in Finland. Marko

I have investigated further and this is what I have found. - I have discovered a section of motorway that is missing, so it appears that all types of way are affected. - The missing ways that I have spotted, all continue beyond the overlap region. They contain nodes within the overlap region but none end within the overlap region. - The output files from splitter contain the missing ways and they are complete; i.e. the way has all its tags and a complete list of its node ids. What is not there, is what you would not expect to be there: the definitions of the nodes which fall beyond the overlap region - their latitudes and longitudes. The effect of this on JOSM is that it draws the nodes that are defined but it does not draw any part of the way. - Splitter does not introduce nodes at the tile boundaries (or if it does, they are not displayed in JOSM, either on the map or in the inspector/Advanced object info). It would seem that mkgmap discards these defective ways. This bug could be fixed in either of two ways: a) Clip the ways in splitter so they are no longer defective. b) Modify mkgmap to accept defective ways and clip them itself. At this point it needs someone with a detailed knowledge of the software, to say how the interface between splitter and mkgmap should work, i.e. whether a) or b) is the correct approach. Only then could bugfixing efforts begin. I hope that the additional information I have provided, will make it that much easier to trace and fix the bug.

Hi Adrian
I have investigated further and this is what I have found.
Thanks for persisting and looking into this further.
This bug could be fixed in either of two ways: a) Clip the ways in splitter so they are no longer defective. b) Modify mkgmap to accept defective ways and clip them itself.
At this point it needs someone with a detailed knowledge of the software, to say how the interface between splitter and mkgmap should work, i.e. whether a) or b) is the correct approach. Only then could bugfixing efforts begin. I hope that the additional information I have provided, will make it that much easier to trace and fix the bug.
The answer to your question is that splitter and mkgmap take approach b). Mkgmap is supposed to chop every line that crosses the bounding box at the boundary and insert a point there no matter how many times the line crosses it. Polygons are sliced so that they remain polygons. This all works usually, so there must be something about the ways that don't work. Is it every way that extends beyond the overlap region that goes missing? [As an aside, mkgmap is capable of working either way a) or b). So if you had a splitter program that introduced nodes on the boundary they have to be tagged with mkgmap:boundary to distinguish them from real nodes.] ..Steve

I'm sorry, I had not tested thoroughly enough, and this was a false alarm. Apologies for taking up your time. The quantities of data are too large for the human eye to scan. We rely on tools and ingenuity to do the testing. In this case it took me a while to discover that the tool was not telling me what I thought it was telling me. I misinterpreted the evidence because a) If a way has an undefined node, JOSM does not draw the way. b) It was a coincidence that the railway missing from my Garmin map, appeared to be missing from the splitter output. It was in fact missing because it was tagged layer=-1, and it was being dropped by the test in the style file.

On Fri, Oct 22, 2010 at 09:30:55PM +0100, Adrian wrote:
b) It was a coincidence that the railway missing from my Garmin map, appeared to be missing from the splitter output. It was in fact missing because it was tagged layer=-1, and it was being dropped by the test in the style file.
For what it is worth, I committed some changes yesterday so that only tunnel=yes railways are hidden, not layer<0. Now also railway=preserved are translated; I was wondering the other day why a nearby historic railway was missing from my map. Another change that I committed yesterday hides tunnel=yes tagged access=no or access=private, and not carrying foot=* nor bicycle=*. Marko

On Thu, Oct 21, 2010 at 5:30 PM, Adrian <ar2988-os@yahoo.co.uk> wrote:
I have investigated further and this is what I have found.
- The output files from splitter contain the missing ways and they are complete; i.e. the way has all its tags and a complete list of its node ids. What is not there, is what you would not expect to be there: the definitions of the nodes which fall beyond the overlap region - their latitudes and longitudes. The effect of this on JOSM is that it draws the nodes that are defined but it does not draw any part of the way.
Can you extract a small test-case containing a single way that isn't properly converted by mkgmap? Scott
participants (4)
-
Adrian
-
Marko Mäkelä
-
Scott Crosby
-
Steve Ratcliffe