<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi Andrzej,<br><br>the problem is this:<br>All routines that prepare the road data are calculating<br>the coordinates in map units (resolution 24).<br>The rounding to resolution 23 happens later. <br>This rounding can produce arcs with two equal <br>points, and that is known to cause crashes.<br><br>It seems that I was a bit naive to think that routing on<br>resolution < 24 can be done that easy :-(<br><br>Now I see at least these problems:<br>- we need a factory method that creates Coord instances<br>rounded to the highest used resolution, in your case 23.<br>- we have to make sure that we don't create bounding<br>boxes with coordinates in higher resolution anywhere<br>- maybe we have to add extra logic regarding tile boundaries<br><br>I'd like to finish the work on the high-prec-coord branch first,<br>so my motivation is low. this really a useful feature? <br><br>Gerd<br><br><br><div>> Date: Sun, 19 Jan 2014 21:06:16 -0800<br>> From: gpetermann_muenchen@hotmail.com<br>> To: mkgmap-dev@lists.mkgmap.org.uk<br>> Subject: Re: [mkgmap-dev] Mapsource crashes while calculating a route<br>> <br>> Hi Andrzej,<br>> <br>> thanks, I can reproduce the error, will investigate later.<br>> <br>> Gerd<br>> <br>> <br>> popej wrote<br>> > Hi Gerd,<br>> > <br>> > here simple example with 23-bit level 0, where Mapsource crashes.<br>> > <br>> > test3-l.osm.pbf - small data with highways only,<br>> > route23.gpx - route which makes Mapsource crash.<br>> > <br>> > I create map executing mkgmap like that:<br>> > java -jar mkgmap.jar --route --levels=0:23,1:22,2:20,3:18 test3-l.osm.pbf<br>> > <br>> > -- <br>> > Best regards,<br>> > Andrzej<br>> > <br>> > _______________________________________________<br>> > mkgmap-dev mailing list<br>> <br>> > mkgmap-dev@.org<br>> <br>> > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev<br>> > <br>> > test3-l.osm.pbf (5K)<br>> > &lt;http://gis.19327.n5.nabble.com/attachment/5793669/0/test3-l.osm.pbf&gt;<br>> > route23.gpx (1K)<br>> > &lt;http://gis.19327.n5.nabble.com/attachment/5793669/1/route23.gpx&gt;<br>> <br>> <br>> <br>> <br>> <br>> --<br>> View this message in context: http://gis.19327.n5.nabble.com/Mapsource-crashes-while-calculating-a-route-tp5793545p5793686.html<br>> Sent from the Mkgmap Development mailing list archive at Nabble.com.<br>> _______________________________________________<br>> mkgmap-dev mailing list<br>> mkgmap-dev@lists.mkgmap.org.uk<br>> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev<br></div>                                            </div></body>
</html>