Commit: r1265: Added --drive-on-left, --drive-on-right and --check-roundabouts options.

Version 1265 was commited by markb on 2009-10-06 21:30:02 +0100 (Tue, 06 Oct 2009) Added --drive-on-left, --drive-on-right and --check-roundabouts options. --drive-on-left --drive-on-right Explicitly specify which side of the road vehicles are expected to drive on. If neither of these options are specified, it is assumed that vehicles drive on the right unless --check-roundabouts is specified and the first roundabout processed is clockwise. --check-roundabouts Check that roundabouts have the expected direction (clockwise when vehicles drive on the left). Roundabouts that are complete loops and have the wrong direction are reversed.

On Tue, Oct 06, 2009 at 09:30:02PM +0100, svn commit wrote:
Version 1265 was commited by markb on 2009-10-06 21:30:02 +0100 (Tue, 06 Oct 2009)
Added --drive-on-left, --drive-on-right and --check-roundabouts options.
--drive-on-left --drive-on-right Explicitly specify which side of the road vehicles are expected to drive on. If neither of these options are specified, it is assumed that vehicles drive on the right unless --check-roundabouts is specified and the first roundabout processed is clockwise.
--check-roundabouts Check that roundabouts have the expected direction (clockwise when vehicles drive on the left). Roundabouts that are complete loops and have the wrong direction are reversed.
I tried --drive-on-right --check-roundabouts, and the generated map is of the same size as with r1260. There are much more diffs than the time stamps, though. This is with 3 tiles and 2 cores. I did not get any warnings or messages on stdout or stderr, or any assertion failures. Does this mean that Finland is OK? Or should I enable some magic logging property to see the errors? One more question: What about roundabouts that have been split because of bus route relations (bus routes would usually not circle the whole roundabout)? Does mkgmap merge them already? Could it? Would some style tagging be needed, in case someone wants to do special line styles or naming based on bus routes? Best regards, Marko

Hi Marko,
I tried --drive-on-right --check-roundabouts, and the generated map is of the same size as with r1260. There are much more diffs than the time stamps, though. This is with 3 tiles and 2 cores.
The code that calculates the arc headings is probably producing a slightly different result (+/- 1 deg) so it's possible that's what all the changes are (if so, not a problem).
I did not get any warnings or messages on stdout or stderr, or any assertion failures. Does this mean that Finland is OK? Or should I enable some magic logging property to see the errors?
Yes, you need to have a logging.properties file (see previous postings) that enables logging for warnings either to the console or to log files.
One more question: What about roundabouts that have been split because of bus route relations (bus routes would usually not circle the whole roundabout)? Does mkgmap merge them already? Could it? Would some style tagging be needed, in case someone wants to do special line styles or naming based on bus routes?
The roundabout checking code tries to check roundabout segments and will report any that it thinks have the wrong direction but it will not reverse any because the check can be fooled. I checked all the roundabouts on the GB mainland and quite a few segmented roundabouts that had segments going in the wrong direction where detected. Quite often, ways get the junction=roundabout tag by mistake (i.e. the're not actually part of a roundabout) and the check will find around 50% of those errors. Cheers, Mark

Hi Mark, On Wed, Oct 07, 2009 at 10:43:39AM +0100, Mark Burton wrote:
I did not get any warnings or messages on stdout or stderr, or any assertion failures. Does this mean that Finland is OK? Or should I enable some magic logging property to see the errors?
Yes, you need to have a logging.properties file (see previous postings) that enables logging for warnings either to the console or to log files.
Thanks, with the logging.properties from http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2009q3/003993.html I got some warnings about roundabouts and fixed a few already.
One more question: What about roundabouts that have been split because of bus route relations (bus routes would usually not circle the whole roundabout)? Does mkgmap merge them already? Could it? Would some style tagging be needed, in case someone wants to do special line styles or naming based on bus routes?
The roundabout checking code tries to check roundabout segments and will report any that it thinks have the wrong direction but it will not reverse any because the check can be fooled. I checked all the roundabouts on the GB mainland and quite a few segmented roundabouts that had segments going in the wrong direction where detected. Quite often, ways get the junction=roundabout tag by mistake (i.e. the're not actually part of a roundabout) and the check will find around 50% of those errors.
I did not find the old discussion on a problematic roundabout, so I cannot check the data. I am just guessing that the problem could be that the roundabout segments were not tagged junction=roundabout (because some validator or renderer could have problems with roundabouts defined in multiple segments). That would be an error of the validator or renderer, of course. Best regards, Marko

Hi Marko,
Thanks, with the logging.properties from http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2009q3/003993.html I got some warnings about roundabouts and fixed a few already.
Good, glad it's useful to you.
I did not find the old discussion on a problematic roundabout, so I cannot check the data. I am just guessing that the problem could be that the roundabout segments were not tagged junction=roundabout (because some validator or renderer could have problems with roundabouts defined in multiple segments). That would be an error of the validator or renderer, of course.
Splitting roundabouts into segments is very common in the UK because of route relations. i.e. a bus route uses part of a roundabout and so the roundabout is split into segments so that only a portion of the roundabout is part of the bus route. You may also wish to try out the new --check-roundabout-flares option which checks that roundabout flare roads are sane (oneway, point in the right directions and don't extend further than they need to). For the GB data, enabling that test gives over 2000 warnings, the vast majority of which are real problems that either break the routing completely or at least give odd routes. I am (slowly) editing the OSM data to fix the problems. It's incredible what crap people are happy to put into the OSM database. I get the impression that most contributors don't give a toss about the map being routable or not. Cheers, Mark

On Tue, Oct 20, 2009 at 02:17:39PM +0100, Mark Burton wrote:
I did not find the old discussion on a problematic roundabout, so I cannot check the data. I am just guessing that the problem could be that the roundabout segments were not tagged junction=roundabout (because some validator or renderer could have problems with roundabouts defined in multiple segments). That would be an error of the validator or renderer, of course.
Splitting roundabouts into segments is very common in the UK because of route relations. i.e. a bus route uses part of a roundabout and so the roundabout is split into segments so that only a portion of the roundabout is part of the bus route.
Same here. I did see warnings about roundabout sections. I fixed one set of these close to Ivalo. There were some "forward" and "backward" relations of these int_ref=E75 roads. It apparently is a dual carriageway (two oneway streets) between roundabouts. Both oneways were running from south to north. :-(
You may also wish to try out the new --check-roundabout-flares option which checks that roundabout flare roads are sane (oneway, point in the right directions and don't extend further than they need to).
Thanks, I think I will try to outsource the job in the Finnish community, possibly by posting a note or link on my map download page http://www.polkupyoraily.net/osm/.
For the GB data, enabling that test gives over 2000 warnings, the vast majority of which are real problems that either break the routing completely or at least give odd routes. I am (slowly) editing the OSM data to fix the problems. It's incredible what crap people are happy to put into the OSM database. I get the impression that most contributors don't give a toss about the map being routable or not.
Right. I have seen the same here. Missing bridges or tunnels, missing junctions or bridges between railway and highways, missing junction nodes, overlapping roads, and so on. We can only hope that the availability of OSM-based mobile routing systems will create some incentive to fix this. On the Finnish OSM forum, there has been some discussion that GpsMid and PhoneME work on dime-a-dozen Windows CE based car navigators. Alas, routing in GpsMid is said to be very slow. (I do not have any first-hand experience, I am only repeating what I read.) Until there is an open-source mobile routing platform, mkgmap will remain relevant. I believe that it could take several years. I hope that my Edge 705 will last so long. :-) Marko

Mark,
You may also wish to try out the new --check-roundabout-flares option which checks that roundabout flare roads are sane (oneway, point in the right directions and don't extend further than they need to).
Thanks, I think I will try to outsource the job in the Finnish community, possibly by posting a note or link on my map download page http://www.polkupyoraily.net/osm/.
In the end, I fixed all (or most) warnings myself. I also ended up fixing some nearby problems. For example in Pori, most residential roads were unconnected in the junctions. Just lines arranged in a grid, but with no junctions. :-( The funniest warning that I fixed was a tiny roundabout of highway=track next to a highway=secondary or so. I replaced it with a single junction node of highway=mini_roundabout and also replaced the highway=track with highway=cycleway, cycleway=track. I wonder why I did not get any warnings for the flare roads of my nearest roundabout: http://www.openstreetmap.org/browse/way/9498558 In the map extracts that mkgmap has processed so far, each of the four Y-shaped ways that connect to the roundabout were defined as two ways, a slash-shaped way that connected to the angled way. None of the ways carried a oneway attribute. I have now split the Y into three ways and defined oneway=yes on the V ways. Best regards, Marko

Mark Burton wrote:
Splitting roundabouts into segments is very common in the UK because of route relations. i.e. a bus route uses part of a roundabout and so the roundabout is split into segments so that only a portion of the roundabout is part of the bus route.
Not to mention motorway-junction roundabouts which have to be split so that part of them can be flagged "bridge=yes" & "layer = 1".
It's incredible what crap people are happy to put into the OSM database. I get the impression that most contributors don't give a toss about the map being routable or not.
True, but unless they've got a Garmin, and use mkgmap, they're unlikely to have tried using the data for routing. There isn't a "mktomtommap" yet, is there? The more people start to wake up to the advantages of up-to-date free maps for their in-car GPS units, the better the data will become. Mind you - it's going to take ages to get universally good. Steve

0> In article <20091020141739.184f9fca@crow>, 0> Mark Burton <URL:mailto:markb@ordern.com> ("Mark") wrote: Mark> For the GB data, enabling that test gives over 2000 warnings, the Mark> vast majority of which are real problems that either break the Mark> routing completely or at least give odd routes. I am (slowly) Mark> editing the OSM data to fix the problems. It's incredible what Mark> crap people are happy to put into the OSM database. I get the Mark> impression that most contributors don't give a toss about the map Mark> being routable or not. Whilst that's certainly at least partially true, it's also the case that editing tools can change more than users expect. I've caused at least broken roundabouts myself when joining ways and not noticing that that has reversed their directions.

Quoting Marko Mäkelä <marko.makela@iki.fi>:
On Tue, Oct 06, 2009 at 09:30:02PM +0100, svn commit wrote:
Version 1265 was commited by markb on 2009-10-06 21:30:02 +0100 (Tue, 06 Oct 2009)
Added --drive-on-left, --drive-on-right and --check-roundabouts options.
--drive-on-left --drive-on-right Explicitly specify which side of the road vehicles are expected to drive on. If neither of these options are specified, it is assumed that vehicles drive on the right unless --check-roundabouts is specified and the first roundabout processed is clockwise.
--check-roundabouts Check that roundabouts have the expected direction (clockwise when vehicles drive on the left). Roundabouts that are complete loops and have the wrong direction are reversed.
I tried --drive-on-right --check-roundabouts, and the generated map is of the same size as with r1260. There are much more diffs than the time stamps, though. This is with 3 tiles and 2 cores.
I did not get any warnings or messages on stdout or stderr, or any assertion failures. Does this mean that Finland is OK? Or should I enable some magic logging property to see the errors?
You need to enable java logging: see http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2009q3/003993.html
participants (6)
-
charlie@cferrero.net
-
Mark Burton
-
Marko Mäkelä
-
Steve Hosgood
-
svn commit
-
Toby Speight