Hi Felix,

note that we are counting arcs here, not ways. An arc connects two routing 
nodes. There will always be two arcs between two nodes A and B,
one from A to B and one from B to A. The node from A to B is the forward arc in 
A and the backward arc in B (and vice versa).
Also, we have so called indirect arcs, those are added by the method 
addArcsToMajorRoads() in RoadNetwork.java.
They help Garmins routing algo to find the next major road.
So, as I said before, we have to find out what exactly causes trouble.

I've attached a new version of the patch. It counts only direct forward arcs. 
Please check if this helps to find problematic places.
Maybe comment the lines
                                if (!arc.isForward())
                                        continue;
or
                                if (!arc.isDirect() )
                                        continue;
so that more arcs are counted.

Reg. overlapping ways: Sure, mkgmap can detect them and print a warning, but it 
would be much more difficult to automatically remove the overlap.
Which part should be removed? This gets even more difficult when the style adds 
several ways for the same OSM way (no matter if routable or not).
Unless both parts are equal I see no way to handle this automatically.

Gerd



________________________________________
Von: mkgmap-dev <[email protected]> im Auftrag von Felix 
Hartmann <[email protected]>
Gesendet: Dienstag, 20. März 2018 01:57:25
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] Bug in Road Merging - actually doubling roads.

Actually it's even worse, in part there are three ways on top of each other. So 
actually I end up with 3 + 3 + 5 ways. Maybe ways on top of each other that 
share the exact same nodes should be joined before put into the map? Garmin 
cannot route in 3D anyhow - so a supposed 2 layered highway that shares the 
same nodes is a problematic case no matter what we do.

On 20 March 2018 at 01:37, Felix Hartmann 
<[email protected]<mailto:[email protected]>> wrote:
Edit, okay sorry - I think the problematic case above is actually a mapping 
error in OSM with two ways overlaying themselves, and both being part of the 
relation - hence my map ends up with 8 routable lines here. It's not mkgmap 
actually doing something wrong (have to check again- but seems not).

Is there a way to detect such an error?

On 20 March 2018 at 01:17, Felix Hartmann 
<[email protected]<mailto:[email protected]>> wrote:
Somehow the patch is putting out quite a bit stuff that seems fine even set to 
10 - I did find one way that breaks routing on device though


http://www.openstreetmap.org/browse/way/310376420
Something is really strange here - the problematic section is the bridge to the 
East, and with ID I cannot properly select it.
Problematic tile: https://openmtbmap.org/63670040.img
Routing over it on my Oregon 600 in simulation mode - it get's stuck as soon as 
it reaches the bridge.


I have now changed my style, before if a route contained a bridge, there was 
supposed to be no extra routable line created for the bridge, this did not work 
in all cases due to the discussed bug. I changed my style to create no extra 
routable line for a bridge if part of a relation, but this did not work either, 
I'm still ending up with 8 routable lines instead of 3 for the bridge itself. 
Very strange.

In general I think quite often it is adjoining ways that are more likely to be 
problematic. Not so easy what to do with all this long list as often it did not 
create more than 2-3 routable lines. The most were 8 (linked above). I'm now 
trying to see what it gives for my changed style. I did go through my style, 
and without this bug the style should create no more than 4 routable lines at 
most for a single street (yes this does not solve if there are two streets that 
get put on top of each other, because of super detailed mapping). However as in 
the above linked example that was not the case.


This is a case where in OSM there is already overlapping data - I'll give it a 
better check tomorrow:
https://www.openstreetmap.org/way/358035804#map=16/44.5885/7.8644



SEVERE (RouteNode): E:\openmtbmap\maps\63670018.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 41.099468,14.210138 when 
routing to 177░ (http://www.openstreetmap.org/browse/way/231702644)
SEVERE (RouteNode): E:\openmtbmap\maps\63670040.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 44.594210,7.870896 when 
routing to 166░ (http://www.openstreetmap.org/browse/way/268949386)
SEVERE (RouteNode): E:\openmtbmap\maps\63670040.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 44.594024,7.870959 when 
routing to 347░ (http://www.openstreetmap.org/browse/way/268949386)
SEVERE (RouteNode): E:\openmtbmap\maps\63670040.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 44.589474,7.868189 when 
routing to 230░ (http://www.openstreetmap.org/browse/way/358035804)
SEVERE (RouteNode): E:\openmtbmap\maps\63670040.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 44.595358,7.869657 when 
routing to 186░ (http://www.openstreetmap.org/browse/way/358035804)
SEVERE (RouteNode): E:\openmtbmap\maps\63670040.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 44.593348,7.870952 when 
routing to 7░ (http://www.openstreetmap.org/browse/way/268949386)
SEVERE (RouteNode): E:\openmtbmap\maps\63670040.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 
44.528092<tel:528092>,7.857529 when routing to 132░ 
(http://www.openstreetmap.org/browse/way/310376420)
SEVERE (RouteNode): E:\openmtbmap\maps\63670040.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 
44.527925<tel:527925>,7.857784 when routing to 313░ 
(http://www.openstreetmap.org/browse/way/310376420)
SEVERE (RouteNode): E:\openmtbmap\maps\63670035.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 44.103926,10.499103 when 
routing to 12░ (http://www.openstreetmap.org/browse/way/261283126)
SEVERE (RouteNode): E:\openmtbmap\maps\63670036.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 44.197738,9.560527 when 
routing to 306░ (http://www.openstreetmap.org/browse/way/216391711)
SEVERE (RouteNode): E:\openmtbmap\maps\63670034.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 43.462818,10.589772 when 
routing to 260░ (http://www.openstreetmap.org/browse/way/131304170)
SEVERE (RouteNode): E:\openmtbmap\maps\63670054.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 
45.658185<tel:658185>,10.045777 when routing to 46░ 
(http://www.openstreetmap.org/browse/way/50847847)
SEVERE (RouteNode): E:\openmtbmap\maps\63670057.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 46.171695,9.870816 when 
routing to 327░ (http://www.openstreetmap.org/browse/way/503763128)
SEVERE (RouteNode): E:\openmtbmap\maps\63670059.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 45.690630,9.675076 when 
routing to 248░ (http://www.openstreetmap.org/browse/way/50730378)
SEVERE (RouteNode): E:\openmtbmap\maps\63670067.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 45.142950,9.170384 when 
routing to 85░ (http://www.openstreetmap.org/browse/way/243855717)
SEVERE (RouteNode): E:\openmtbmap\maps\63670066.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 45.488240,9.195559 when 
routing to 201░ (http://www.openstreetmap.org/browse/way/262420957)
SEVERE (RouteNode): E:\openmtbmap\maps\63670066.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 45.488326,9.195591 when 
routing to 195░ (http://www.openstreetmap.org/browse/way/262420957)
SEVERE (RouteNode): E:\openmtbmap\maps\63670070.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 45.586536,8.924042 when 
routing to 235░ (http://www.openstreetmap.org/browse/way/450869558)
SEVERE (RouteNode): E:\openmtbmap\maps\63670072.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 45.598025,13.786274 when 
routing to 68░ (http://www.openstreetmap.org/browse/way/26661412)
SEVERE (RouteNode): E:\openmtbmap\maps\63670076.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 42.736224,12.736811 when 
routing to 94░ (http://www.openstreetmap.org/browse/way/444595723)
SEVERE (RouteNode): E:\openmtbmap\maps\63670076.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 42.736221,12.736862 when 
routing to 275░ (http://www.openstreetmap.org/browse/way/444595723)
SEVERE (RouteNode): E:\openmtbmap\maps\63670076.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 42.733896,12.733320 when 
routing to 145░ (http://www.openstreetmap.org/browse/way/166104158)
SEVERE (RouteNode): E:\openmtbmap\maps\63670076.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 42.733569,12.733668 when 
routing to 325░ (http://www.openstreetmap.org/browse/way/166104158)
SEVERE (RouteNode): E:\openmtbmap\maps\63670076.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 
42.735211<tel:735211>,12.734411 when routing to 19░ 
(http://www.openstreetmap.org/browse/way/115921194)
SEVERE (RouteNode): E:\openmtbmap\maps\63670076.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 
42.735631<tel:735631>,12.734614 when routing to 19░ 
(http://www.openstreetmap.org/browse/way/115921194)
SEVERE (RouteNode): E:\openmtbmap\maps\63670076.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 42.737543,12.738809 when 
routing to 348░ (http://www.openstreetmap.org/browse/way/205144591)
SEVERE (RouteNode): E:\openmtbmap\maps\63670076.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 42.991118,12.671455 when 
routing to 176░ (http://www.openstreetmap.org/browse/way/226058688)
SEVERE (RouteNode): E:\openmtbmap\maps\63670076.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 42.990426,12.671494 when 
routing to 0░ (http://www.openstreetmap.org/browse/way/226058688)
SEVERE (RouteNode): E:\openmtbmap\maps\63670076.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 42.733015,12.737255 when 
routing to 48░ (http://www.openstreetmap.org/browse/way/394187014)
SEVERE (RouteNode): E:\openmtbmap\maps\63670076.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 42.737876,12.738618 when 
routing to 155░ (http://www.openstreetmap.org/browse/way/205144591)
SEVERE (RouteNode): E:\openmtbmap\maps\63670076.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 
42.735138<tel:735138>,12.735350<tel:735350> when routing to 19░ 
(http://www.openstreetmap.org/browse/way/524788388)
SEVERE (RouteNode): E:\openmtbmap\maps\63670076.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 42.736208,12.736964 when 
routing to 280░ (http://www.openstreetmap.org/browse/way/444595723)
SEVERE (RouteNode): E:\openmtbmap\maps\63670076.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 42.736087,12.737346 when 
routing to 306░ (http://www.openstreetmap.org/browse/way/166123198)
SEVERE (RouteNode): E:\openmtbmap\maps\63670076.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 
42.735055<tel:735055>,12.734571 when routing to 289░ 
(http://www.openstreetmap.org/browse/way/115921194)
SEVERE (RouteNode): E:\openmtbmap\maps\63670076.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 
42.735651<tel:735651>,12.736162 when routing to 307░ 
(http://www.openstreetmap.org/browse/way/166104131)
SEVERE (RouteNode): E:\openmtbmap\maps\63670076.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 42.737428,12.738789 when 
routing to 13░ (http://www.openstreetmap.org/browse/way/205144591)
SEVERE (RouteNode): E:\openmtbmap\maps\63670076.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 42.738709,12.740727 when 
routing to 340░ (http://www.openstreetmap.org/browse/way/205131584)
SEVERE (RouteNode): E:\openmtbmap\maps\63670076.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 42.989677,12.671807 when 
routing to 149░ (http://www.openstreetmap.org/browse/way/77223727)
SEVERE (RouteNode): E:\openmtbmap\maps\63670076.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 42.930978,13.089920 when 
routing to 3░ (http://www.openstreetmap.org/browse/way/67628358)
SEVERE (RouteNode): E:\openmtbmap\maps\63670077.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 
42.535039<tel:535039>,12.757507 when routing to 288░ 
(http://www.openstreetmap.org/browse/way/62229017)
SEVERE (RouteNode): E:\openmtbmap\maps\63670077.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 42.534998,12.757686 when 
routing to 288░ (http://www.openstreetmap.org/browse/way/62229017)
SEVERE (RouteNode): E:\openmtbmap\maps\63670080.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 46.065012,13.246466 when 
routing to 159░ (http://www.openstreetmap.org/browse/way/526738082)
SEVERE (RouteNode): E:\openmtbmap\maps\63670080.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 46.063818,13.247116 when 
routing to 160░ (http://www.openstreetmap.org/browse/way/526738082)
SEVERE (RouteNode): E:\openmtbmap\maps\63670080.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 46.063818,13.247116 when 
routing to 340░ (http://www.openstreetmap.org/browse/way/526738082)
SEVERE (RouteNode): E:\openmtbmap\maps\63670080.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 46.062397,13.247571 when 
routing to 352░ (http://www.openstreetmap.org/browse/way/526738082)
SEVERE (RouteNode): E:\openmtbmap\maps\63670080.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 46.066478,13.245662 when 
routing to 159░ (http://www.openstreetmap.org/browse/way/526738082)
SEVERE (RouteNode): E:\openmtbmap\maps\63670083.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 45.480502,12.573502 when 
routing to 57░ (http://www.openstreetmap.org/browse/way/296891396)
SEVERE (RouteNode): E:\openmtbmap\maps\63670083.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 45.479995,12.572592 when 
routing to 51░ (http://www.openstreetmap.org/browse/way/296891396)
SEVERE (RouteNode): E:\openmtbmap\maps\63670093.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 
43.423061<tel:423061>,11.122175 when routing to 246░ 
(http://www.openstreetmap.org/browse/way/109792923)
SEVERE (RouteNode): E:\openmtbmap\maps\63670090.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 
44.576464,11.368615<tel:368615> when routing to 287░ 
(http://www.openstreetmap.org/browse/way/289500850)
SEVERE (RouteNode): E:\openmtbmap\maps\63670093.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 
43.423083<tel:423083>,11.122244 when routing to 246░ 
(http://www.openstreetmap.org/browse/way/109792923)
SEVERE (RouteNode): E:\openmtbmap\maps\63670092.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 
44.647965<tel:647965>,10.934005 when routing to 210░ 
(http://www.openstreetmap.org/browse/way/184765377)
SEVERE (RouteNode): E:\openmtbmap\maps\63670092.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 
44.641820<tel:641820>,10.923750 when routing to 18░ 
(http://www.openstreetmap.org/browse/way/184119527)
SEVERE (RouteNode): E:\openmtbmap\maps\63670096.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 43.111527,12.391685 when 
routing to 318░ (http://www.openstreetmap.org/browse/way/23079043)
SEVERE (RouteNode): E:\openmtbmap\maps\63670096.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 43.453887,12.236974 when 
routing to 338░ (http://www.openstreetmap.org/browse/way/134104701)
SEVERE (RouteNode): E:\openmtbmap\maps\63670096.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 43.455952,12.237370 when 
routing to 241░ (http://www.openstreetmap.org/browse/way/134104701)
SEVERE (RouteNode): E:\openmtbmap\maps\63670096.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 43.572849,12.138348 when 
routing to 102░ (http://www.openstreetmap.org/browse/way/49245384)
SEVERE (RouteNode): E:\openmtbmap\maps\63670096.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 43.111334,12.391722 when 
routing to 345░ (http://www.openstreetmap.org/browse/way/23079043)
SEVERE (RouteNode): E:\openmtbmap\maps\63670097.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 42.419061,12.106760 when 
routing to 18░ (http://www.openstreetmap.org/browse/way/94916749)
SEVERE (RouteNode): E:\openmtbmap\maps\63670101.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 44.839517,11.616697 when 
routing to 304░ (http://www.openstreetmap.org/browse/way/23867528)
SEVERE (RouteNode): E:\openmtbmap\maps\63670101.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 44.839494,11.616747 when 
routing to 304░ (http://www.openstreetmap.org/browse/way/23867528)
SEVERE (RouteNode): E:\openmtbmap\maps\63670101.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 44.840777,11.614020 when 
routing to 305░ (http://www.openstreetmap.org/browse/way/23867528)
SEVERE (RouteNode): E:\openmtbmap\maps\63670101.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 44.836746,11.619784 when 
routing to 203░ (http://www.openstreetmap.org/browse/way/109082692)
SEVERE (RouteNode): E:\openmtbmap\maps\63670101.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 44.839148,11.617493 when 
routing to 304░ (http://www.openstreetmap.org/browse/way/23867528)
SEVERE (RouteNode): E:\openmtbmap\maps\63670113.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 45.436562,10.996342 when 
routing to 140░ (http://www.openstreetmap.org/browse/way/552651963)
SEVERE (RouteNode): E:\openmtbmap\maps\63670114.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 45.869223,10.886843 when 
routing to 236░ (http://www.openstreetmap.org/browse/way/225847075)
SEVERE (RouteNode): E:\openmtbmap\maps\63670117.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 45.570251,11.935898 when 
routing to 109░ (http://www.openstreetmap.org/browse/way/132914664)
SEVERE (RouteNode): E:\openmtbmap\maps\63670117.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 45.570286,11.935696 when 
routing to 103░ (http://www.openstreetmap.org/browse/way/132914664)
SEVERE (RouteNode): E:\openmtbmap\maps\63670116.osm.pbf: 10 or more arcs with 
the same initial bearing, expect routing problems at 46.553374,11.778210 when 
routing to 17░ (http://www.openstreetmap.org/browse/way/239751200)

On 15 March 2018 at 09:53, Gerd Petermann 
<[email protected]<mailto:[email protected]>> wrote:
Hi Felix,

further thoughts about this: Up to now we concentrate on problems caused by 
rouding errors when OSM (~32 bit) coordinates
are placed on the 24 Garmin raster.
What about places where OSM data already contains overlapping highways?
I think there is currently no code in mkgmap to handle this properly. Don't 
know if we can find rules to handle this,
if not we should print warning messages, as it is likely to cause trouble.
Overlapping can mean :
* two different OSM ways with identical sequences of 2 or more nodes, e.g. 
a-b-c-d and x-b-c-y
* two different OSM ways with identical sequences of 2 or more nodes, but in 
reversed order, e.g. a-b-c-d and x--d-c-y

My understanding is that these are mapping errors, but as said before there is 
no code to detect this. There might be
warnings, e.g. in the housenumber code.

Gerd

________________________________________
Von: mkgmap-dev 
<[email protected]<mailto:[email protected]>>
 im Auftrag von Gerd Petermann 
<[email protected]<mailto:[email protected]>>
Gesendet: Mittwoch, 14. März 2018 17:25:22
An: [email protected]<mailto:[email protected]>
Betreff: Re: [mkgmap-dev] Bug in Road Merging - actually doubling roads.

Hi Felix,
yes, change it to a gigher value first.

Gerd

Felix Hartmann-2 wrote
> Hi Gerd,
>
> I get a huge huge list - and the ones I tried seemed to be quite alright -
> but the couple that I checked where simply ways that my styles inserts at
> least 3-4 times (usually ways with hiking/mtb route). Should I increase
> the
> counter in the patch to 5 (I guess still alright) or to 6 (I'm pretty sure
> I get routing errors then)?
>
> Felix





--
Sent from: http://gis.19327.n8.nabble.com/Mkgmap-Development-f5324443.html
_______________________________________________
mkgmap-dev mailing list
[email protected]<mailto:[email protected]>
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[email protected]<mailto:[email protected]>
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev



--
Felix Hartman - Openmtbmap.org & VeloMap.org
Schusterbergweg 32/8
6020 Innsbruck
Austria - Österreich



--
Felix Hartman - Openmtbmap.org & VeloMap.org
Schusterbergweg 32/8
6020 Innsbruck
Austria - Österreich



--
Felix Hartman - Openmtbmap.org & VeloMap.org
Schusterbergweg 32/8
6020 Innsbruck
Austria - Österreich

Attachment: count-same-bearing-v2.patch
Description: count-same-bearing-v2.patch

_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to