logo separator

[mkgmap-dev] Bug in Road Merging - actually doubling roads.

From Gerd Petermann gpetermann_muenchen at hotmail.com on Sat Feb 24 07:37:52 GMT 2018

Hi all,

I don't think this problem is caused by merging, at least not the problem that I see with the default style. I also don't think that merging can help to solve the problem.
This is just a problem of resolution. The junction is simply too far away from any Garmin grid point and there will always be distortions.
The question is if this has an effect on routing. Although the map shows a u-turn the angles that are stored in the img file should be very different from 180°.
With the default style Basecamp shows an angle of ~45° in the routing directions for a turn from west to south-east.
So, I think Felix is right that the real problem is the number of routable ways that his style produces and - maybe - how the road merger connects them.

@Felix: Please, can you create a map with your style for the small extract in the previously posted orig.osm.pbf and post a link for further anylyses?
If possible, please use the attached patch to compile a special version of mkgmap first. Note the hard coded path "e:/ld/" in the patch,
please change that to a directory on your machine. 
To compile please use the command 
ant resolve-optional dist
Make sure that you don't use this module for normal input files, it creates a lot of debug files!
Just zip all the files and post them as well if possible.

thanks,
Gerd


________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Felix Hartmann <extremecarver at gmail.com>
Gesendet: Freitag, 23. Februar 2018 19:08:45
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] Bug in Road Merging - actually doubling roads.

I think merging is fine - maybe just add restrictions to the adjoining ways if preset. And it really should not happen that ways are merged past a junction - I now think this happens in some more places. Because it's not the first time I notice that a routing turns 180° to return to the junction to actually turn.
And maybe could there be a filter that there are never more than 5 routable ways from continue command? From 6 onwards it crashes devices. Maybe even from 5 onwards. 1 routable original and 3 routable overlays are definitely fine. (Basecamp/Mapsource don't care - it only crashes GPS devices).

On 23 February 2018 at 09:12, Henning Scholland <osm at hscholland.de<mailto:osm at hscholland.de>> wrote:
Hi Gerd,
Maybe it's better to try to merge these small ways as they anyway only creates 'ugly' roads. With increasing level of details in OSM I think mkgmap will need some preprocessing to generalise the data first. I'm not only thinking about these very small ways, but also have the lane-mapping and other mapping details, which are not important for Garmin maps.
Henning
On 23 Feb 2018, at 15:21, Gerd Petermann <gpetermann_muenchen at hotmail.com<mailto:gpetermann_muenchen at hotmail.com>> wrote:

Hi Felix,

I have to think about this for a while. There are three very short ways connected in node 412440328:
way 130665733 : the northern node 1263658617 is close to a Garmin grid point, the sourthern node 412440328 is also closer to this grid point than to any other,
so both are rounded to the same grid point in the north, and finally it is ignored.
way 110722884:  the way is only ~1m long and  both nodes are far from any Garmin grid point. This is the way that is causing the trouble.
It is not removed, instead the initial rounding changes it to a ~3m way  going north -> south.
way 130663479: the way has 3 nodes, and the one in the middle (node 1263658804) is rounded to the same coords as the ends of the bridge (way 103567847) and way 110722884, while the northern node 412440328 is moved up.

I've attached 4 files to document the problem. Please load into JOSM to visualize:
orig.osm.pbf: the original osm data
init_hp.osm.pbf: the road network as input to WrongAngleFixer in so called "high precision"
init_mu.osm.pbf: like init_hp.osm.pbf, but rounded to Garmin map units
after-WO_mu.osm.pbf: the result of WrongAngleFixer with coords rounded to Garmin map units
(please ignore the fact that the node ids in non-orig files are wrong)

Somehow I have to teach mkgmap that it would be better to ignore (also) way 110722884. I don't know yet what criteria I should use for that.
Normally we try to keep all routable ways, as they may contain access restrictions.

BTW: There is more such trouble near way 111528851.

ciao,
Gerd

________________________________

Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk<mailto:mkgmap-dev-bounces at lists.mkgmap.org.uk>> im Auftrag von Felix Hartmann <extremecarver at gmail.com<mailto:extremecarver at gmail.com>>
Gesendet: Donnerstag, 22. Februar 2018 20:19:15
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] Bug in Road Merging - actually doubling roads.

Perfect. I guess my maps are the only one causing bsod here on devices, but without the bug they would be fine...

On 22 Feb 2018 20:03, "Gerd Petermann" <gpetermann_muenchen at hotmail.com<mailto:gpetermann_muenchen at hotmail.com><mailto:gpetermann_muenchen at hotmail.com<mailto:gpetermann_muenchen at hotmail.com>>> wrote:
Hi Felix,

I can reproduce the problem with a small download around the way and just the --route option.
The problem seems to be in WrongAngleFixer, it says
"... all points of way http://www.openstreetmap.org/way/130665733 are rounded to equal map units"
No idea why the way is not reduced to a single point, will investigate further.

Gerd

________________________________

Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk<mailto:mkgmap-dev-bounces at lists.mkgmap.org.uk><mailto:mkgmap-dev-bounces at lists.mkgmap.org.uk<mailto:mkgmap-dev-bounces at lists.mkgmap.org.uk>>> im Auftrag von Felix Hartmann <extremecarver at gmail.com<mailto:extremecarver at gmail.com><mailto:extremecarver at gmail.com<mailto:extremecarver at gmail.com>>>
Gesendet: Donnerstag, 22. Februar 2018 19:27:44
An: Development list for mkgmap
Betreff: [mkgmap-dev] Bug in Road Merging - actually doubling roads.

I just noticed that mkgmap sometimes creates a lot more routable roads for a certain stretch than actually defined in the style-file.

https://www.openstreetmap.org/way/130665733

should be only once as a routable line in my map, however it ends up 6 times!
Once is correct, but 5 iterations are actually the way from the south (3 times) and the way from the East (2 times). Now each of these ways should be created that often, however it should not overlay into this short stretch of way.

While doubling up ways can be beneficial for routing, having a way more than 5 times on top of each other let's Garmin devices crash on routing over them. Also it leads to detours - as it will not always route straight from the Way from South to the Way going to the West, but follow along after the intersection for 4.3m until hitting up north, then reversing and finally going to the way in the West.

I've uploaded the tile here:
https://openmtbmap.org/gmapsupp_copied.img


I'm pretty sure that with other style-files - the way will also be copied past the intersection and end up too often in the map for that 4.3m stretch...


I kinda guess it is related to it being so short - that place has some remarkable micro-mapping detail.
Or is this really expected?


If needed I can try to create a reduced style to only create that problem - but I think the bug should be obvious.


--
Felix Hartman - Openmtbmap.org<http://Openmtbmap.org> & VeloMap.org<http://VeloMap.org>
Schusterbergweg 32/8
6020 Innsbruck
Austria - Österreich
________________________________

mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk<mailto:mkgmap-dev at lists.mkgmap.org.uk><mailto:mkgmap-dev at lists.mkgmap.org.uk<mailto:mkgmap-dev at lists.mkgmap.org.uk>>
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

________________________________

mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk<mailto:mkgmap-dev at lists.mkgmap.org.uk>
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

_______________________________________________
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk<mailto:mkgmap-dev at lists.mkgmap.org.uk>
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev



--
Felix Hartman - Openmtbmap.org & VeloMap.org
Schusterbergweg 32/8
6020 Innsbruck
Austria - Österreich
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WrongAngleFixer.java.patch
Type: application/octet-stream
Size: 2214 bytes
Desc: WrongAngleFixer.java.patch
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20180224/a1180dbc/attachment-0001.obj>


More information about the mkgmap-dev mailing list