RoadMerger and adjust-turn-headings

Hi WanMil, I think the code for --adjust-turn-headings in RouteNode.tweezeArcs() looks rather similar to that in RoadMerger, and maybe will not work as well in combination with RoadMerger as it assumes that two arcs with the same road (OSM id) are building the "main road": // the code tries to detect a pair of arcs (the "incoming" // arc and the "outgoing" arc) that are the "main road" // and the remaining arc (called the "other" arc) which is // the "side road" I got the impression that RoadMerger also calculates the required data (angles etc). It would be great if RoadMerger could store the information somewhere so that tweezeArcs could use it. Gerd

Hi WanMil,
I think the code for --adjust-turn-headings in RouteNode.tweezeArcs() looks rather similar to that in RoadMerger, and maybe will not work as well in combination with RoadMerger as it assumes that two arcs with the same road (OSM id) are building the "main road":
// the code tries to detect a pair of arcs (the "incoming" // arc and the "outgoing" arc) that are the "main road" // and the remaining arc (called the "other" arc) which is // the "side road"
I got the impression that RoadMerger also calculates the required data (angles etc). It would be great if RoadMerger could store the information somewhere so that tweezeArcs could use it.
Gerd
Ok, do you have an idea how to store the required information? WanMil

Hi WanMil,
I got the impression that RoadMerger also calculates the required data (angles etc). It would be great if RoadMerger could store the information somewhere so that tweezeArcs could use it.
Ok, do you have an idea how to store the required information?
Good question. I'd say the information should be stored with the Coord instance that connects two ways, so we'd need a CoordPOI for that. Next we have to make sure that the info is passed along the chain to tweezeArcs(). In tweezeArcs() we must make sure that we can identify the info. This must work even if the connection point is used multiple times: A crossing point shared by four or more different OSM ways might be used two times to connect ways in RoadMerger. I guess the only constant during this process is the location of the neighbour points. You could store the result of Utils.coord2Long() (in the branch). The information that should be stored is similar to that produced by the so called through-routes: If you travel from point a via point b, the next point on the "main road" is point c. Does that make sense? Gerd

Hi WanMil, in addition to my previous post: A completely different approach would be to add or change a point near the crossing (in RoadMerger) so that the bearings calculated in RoadNetwork are fine. In that case we just have to store one bit in the Coord instance to tell tweezeArcs() that this point should not be changed. The additional point(s) could be very close to the crossing and maybe removed later. Gerd
Date: Thu, 20 Feb 2014 22:35:40 +0100 From: wmgcnfg@web.de To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] RoadMerger and adjust-turn-headings
Hi WanMil,
I think the code for --adjust-turn-headings in RouteNode.tweezeArcs() looks rather similar to that in RoadMerger, and maybe will not work as well in combination with RoadMerger as it assumes that two arcs with the same road (OSM id) are building the "main road":
// the code tries to detect a pair of arcs (the "incoming" // arc and the "outgoing" arc) that are the "main road" // and the remaining arc (called the "other" arc) which is // the "side road"
I got the impression that RoadMerger also calculates the required data (angles etc). It would be great if RoadMerger could store the information somewhere so that tweezeArcs could use it.
Gerd
Ok, do you have an idea how to store the required information?
WanMil
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
participants (2)
-
Gerd Petermann
-
WanMil