logo separator

[mkgmap-dev] dissapearing roads

From Gerd Petermann gpetermann_muenchen at hotmail.com on Mon Mar 24 04:32:14 GMT 2014



Hi Michal,

okay, now I was able to reproduce it, don't know what I did wrong before,
the problem occurs also with the default style, typically for motorways
in the overview map.

This is what happens:
You have two ways with equal attributes like name, type etc.
Both ways share one or more points, but they are going in opposite 
directions, but they share not all points.
The LineMergeFilter doesn't care about direction and merges the two lines.
This creates a line with a spike, 
Simple case:
Line1 : a->b->c
Line2:       b<-c
Result after merge:  a,b,c,b
The DouglasPeuckerFilter removes the spike between a and the last b 
when the error is within the tolerance, so the remaining line is  a->b instead
of a->c

In the worst case, a long way with an almost equal long spike is "simplified"
to a much shorter way.

In older releases this situation was handled by "preserving" the merge point
in LineMergeFilter, so that the DP filter did not make this error. 
I removed that feature because the "preserved" flag was stored within the 
point object and was used for all higher resolutions and also for all other
lines or shapes referencing that point. The effect is that the DP filter did
not work as well as possible.
Of course I did not think about the above problem :-(

I am not yet sure how to fix this problem. I guess I should 
try to detect the spike before executing the DP filter, or 
find a better variant of the preserved points,
or change LineMergeFilter to avoid merging lines
when that creates a spike. 
Have to get some more sleep now...

Gerd






Date: Sun, 23 Mar 2014 23:14:10 +0100
From: michal.rogala at gmail.com
To: mkgmap-dev at lists.mkgmap.org.uk
Subject: Re: [mkgmap-dev] dissapearing roads


If you wan't to reproduce this bug, modify default style in that way:

1) Remove 

highway=tertiary [0x05 road_class=1 road_speed=3 resolution 23]



2) Replace it with:

highway=tertiary [0x05 resolution 20-20 continue]
highway=tertiary [0x05 resolution 21-21 continue]
highway=tertiary [0x05 resolution 22-22 continue]
highway=tertiary [0x05 road_class=1 road_speed=3 resolution 23]



Proof:

http://imgur.com/j4EdLUd
http://imgur.com/NaQvmKV


:)



best regards


Michal Rogala


2014-03-23 22:03 GMT+01:00 Michał Rogala <michal.rogala at gmail.com>:


2014-03-23 21:03 GMT+01:00 GerdP <gpetermann_muenchen at hotmail.com>:


Hi Michal,



You said that GPSMapEdit shows that the way is really missing. I saw lines

with

the types you use (0x1101b and 0x1101d), both with and without

--preserve-element-order.

Hi!

Here is part of Domaniewska street missing at Level 3:

http://imgur.com/EhvRxqJ


Selected  (purple) roads are type 0x1101b. Missing part should also be 0x1101b


(best seen when you force level by pressing "3" on the keyboard in MapEdit).

best regards

Michal Rogala


 



_______________________________________________
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20140324/c9cecbcd/attachment.html>


More information about the mkgmap-dev mailing list