I did not test the first version of the patch very deeply, but I think that we must remove code that
nobody understands as fast as possible, esp. as correct routing is one of the most
important features.
I never understood why the original code iterates multiple times.
first version of my patch.
2) I try to find out if the iteration is strictly needed or not. If it turns
out to be needed we (you) can start re-writing the code.
reg. test data: I did not yet try to understand why a short arc brakes
routing. I assume it is because you can't calculate the bearing with
I just know that I see error messages like "road ... contains zero length arc at ... "
or "road ... contains consecutive identical nodes at ... "
when I omit the removeShortArcs call.
and see what happens. If I don't find a problem in Europe,
it is likely that we don't need iteration.
> Date: Thu, 17 Jan 2013 14:28:02 +0000
> From: steve@parabola.me.uk
> To: mkgmap-dev@lists.mkgmap.org.uk
> Subject: [mkgmap-dev] Remove short arcs
>
>
> Hi Gerd
>
> > Yes, today I tried to put it into RoadNetWork, but then I found out that
> > this
> > routine sees the roads after they were split into smaller parts by
> > StyledConverter. So, a lot more program logic has to be changed, and I think
>
> Yes, most of that code should be moved too.
> And anyway, shouldn't the short arc code be run after cutting the
> roads up anyway? It might also be possible to combine the two
> functions.
>
> > that I don't
> > understand enough for that :-(
> > I hope you can solve this, because I am not that happy with the
> > removeShortArcs_v3.patch as well.
>
> I don't understand it either.
> I suspect that it might be possible to solve the actual problem
> that removeShortArcs is attempting to solve, at the level of building
> the NOD file. But the only way to find out would be to find or
> construct cases that don't route properly as tests and experiment.
>
> In the short term we need to decide on something to do. We
> could disable the failing tests for the moment, go back to the
> version that didn't iterate multiple times over the roads, or
> go back to running it over all lines.
>
> Running over all lines is a step backwards in my opinion. The second
> option seems fine to me, as long as there are no error messages about
> short arcs. Even though the results are different they could well be for
> the better. The comments about contour lines in that routine make me
> think that it could be simplified now that we are not running it
> on contours. Lastly we could disable the failing tests for now,
> since they are false failures.
>
> So it depends on what you think about the original patch that didn't
> run multiple times over the ways. If you think it is definitely broken
> then we should @Ignore the failing test, and I will try out ways of
> re-structuring all that code. I've wanted to do it for a long time
> since I think that it is a barrier to any routing improvements.
>
> ..Steve
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev@lists.mkgmap.org.uk
> http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev