[mkgmap-dev] [Patch v3] drive-on-left/drive-on-right handling
From Gerd Petermann gpetermann_muenchen at hotmail.com on Tue Dec 2 10:00:14 GMT 2014
Hi all, attached is v3 of the patch. I think we should finish this before we start with the coding for the non-rectangular tiles support. 1) I've tried to make sure that the flags in TRE and NOD are set to equal values. 2) The options --drive-on-left and --drive-on-right are deprecated but still evaluated, for now a warning is printed when they are used. The new option --drive-on=detect|right|left should be used instead. The value detect enables a rather complex (but not CPU-intensive) algo: 1) For each roundabout it checks if the country is known and -- if so -- if the country is a drive-on-left country. 2) If the number of "dol" roundabouts is larger than the rest, the internal drive-on switch is set to "left", similar the internal drive-on switch is set to "right" if the number of "dor" roundabouts is larger than the rest. This works only if either a complete bounds file is used or the default country is set with --country-abbr or --country-name. 3) If option --check-roundabouts is used and the internal drive-on switch is still "detect", than the first found roundabout is used to set the internal drive--on switch. 4) Finally, If the internal drive-on switch is "left", the flags in the headers are set to 1. 5) The polish fomat reader now recognizes the line LeftSideTraffic=Y in the mp file. 6) If the user specifies --drive-on=left, both header flags are set to 1, no matter what roundabouts are found. @Steve, WanMil: I've added a ThreadLocal<boolean> to TREHeader similar to that in NODHeader, but I think it would be better to store that info only once for each thread, I just don't know where, maybe MapMaker? Besides that I am not sure how this works when we write two different TREHeader files in one thread (one for the overview map data ovm_*.img) (well, the flag in these files is ignored anyway) Please suggest a better solution. Gerd -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20141202/ec69b4e7/attachment-0001.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: driving-side-v3.patch Type: application/octet-stream Size: 34439 bytes Desc: not available URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20141202/ec69b4e7/attachment-0001.obj>
- Previous message: [mkgmap-dev] Commit: r3358: ISO-filter-v2.patch : new style filter country-ISO
- Next message: [mkgmap-dev] [Patch v3] drive-on-left/drive-on-right handling
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list