[mkgmap-dev] cannot route when end node is at the tile edge
The road intersection "Daang Hari" is exactly at the edge of my tile (made with splitter) routing does not work. But when I created another mapset without the splitter, routing works. http://www.openstreetmap.org/?lat=14.413996&lon=121.01714&zoom=18&layers=B000FTF -- cheers, maning -- "Freedom is still the most radical idea of all" -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ -- ___ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Re: [mkgmap-dev] cannot route when end node is at the tile edge
Hi Maning, > The road intersection "Daang Hari" is exactly at the edge of my tile > (made with splitter) routing does not work. But when I created > another mapset without the splitter, routing works. > > > http://www.openstreetmap.org/?lat=14.413996&lon=121.01714&zoom=18&layers=B000FTF > Which part of this junction actually falls on the exact line of the edge? It can't be the whole junction, just some part of it. Can you please post the XML bounds elements from the two tiles? It's near the top of the OSM file and looks like this example: Cheers, Mark ___ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Re: [mkgmap-dev] cannot route when end node is at the tile edge
It's exactly this node. I will post the bounds later On Sat, Jul 18, 2009 at 2:21 PM, Mark Burton wrote: > > Hi Maning, > >> The road intersection "Daang Hari" is exactly at the edge of my tile >> (made with splitter) routing does not work. But when I created >> another mapset without the splitter, routing works. >> >> >> http://www.openstreetmap.org/?lat=14.413996&lon=121.01714&zoom=18&layers=B000FTF >> > > Which part of this junction actually falls on the exact line of the > edge? It can't be the whole junction, just some part of it. > > Can you please post the XML bounds elements from the two tiles? It's > near the top of the OSM file and looks like this example: > > maxlon='-0.131836'/> > > Cheers, > > Mark > ___ > mkgmap-dev mailing list > mkgmap-dev@lists.mkgmap.org.uk > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > -- cheers, maning -- "Freedom is still the most radical idea of all" -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ -- ___ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Re: [mkgmap-dev] cannot route when end node is at the tile edge
Using the same data without splitting routing is OK (Screenshot-2.png) Now trying with tiled data (screenshot-5.png), mapsource cannot route (screenshot-3.png). If I zoom a little bit closer the other tile disappears (screenshot-6.png). I can confirm this both in mapsource and roadtrip On Sat, Jul 18, 2009 at 2:27 PM, maning sambale wrote: > It's exactly this node. I will post the bounds later > > On Sat, Jul 18, 2009 at 2:21 PM, Mark Burton wrote: >> >> Hi Maning, >> >>> The road intersection "Daang Hari" is exactly at the edge of my tile >>> (made with splitter) routing does not work. But when I created >>> another mapset without the splitter, routing works. >>> >>> >>> http://www.openstreetmap.org/?lat=14.413996&lon=121.01714&zoom=18&layers=B000FTF >>> >> >> Which part of this junction actually falls on the exact line of the >> edge? It can't be the whole junction, just some part of it. >> >> Can you please post the XML bounds elements from the two tiles? It's >> near the top of the OSM file and looks like this example: >> >> > maxlon='-0.131836'/> >> >> Cheers, >> >> Mark >> ___ >> mkgmap-dev mailing list >> mkgmap-dev@lists.mkgmap.org.uk >> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev >> > > > > -- > cheers, > maning > -- > "Freedom is still the most radical idea of all" -N.Branden > wiki: http://esambale.wikispaces.com/ > blog: http://epsg4253.wordpress.com/ > -- > -- cheers, maning -- "Freedom is still the most radical idea of all" -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ -- <><><><>___ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Re: [mkgmap-dev] cannot route when end node is at the tile edge
Here's areas.list result from splitter # List of areas # Generated Mon Jul 13 21:55:45 PHT 2009 # 63240001: 215040,5447680 to 600064,5754880 # : 4.614258,116.894531 to 12.875977,123.486328 63240002: 215040,5754880 to 600064,5900288 # : 4.614258,123.486328 to 12.875977,126.606445 63240003: 600064,5447680 to 690176,5615616 # : 12.875977,116.894531 to 14.809570,120.498047 63240004: 600064,5615616 to 671744,5658624 # : 12.875977,120.498047 to 14.414063,121.420898 63240005: 671744,5615616 to 690176,5640192 # : 14.414063,120.498047 to 14.809570,121.025391 63240006: 671744,5640192 to 690176,5658624 # : 14.414063,121.025391 to 14.809570,121.420898 63240007: 690176,5447680 to 985088,5658624 # : 14.809570,116.894531 to 21.137695,121.420898 63240008: 600064,5658624 to 985088,5900288 # : 12.875977,121.420898 to 21.137695,126.606445 On Sat, Jul 18, 2009 at 11:17 PM, maning sambale wrote: > Using the same data without splitting routing is OK (Screenshot-2.png) > > Now trying with tiled data (screenshot-5.png), mapsource cannot route > (screenshot-3.png). > If I zoom a little bit closer the other tile disappears > (screenshot-6.png). I can confirm this both in mapsource and roadtrip > > On Sat, Jul 18, 2009 at 2:27 PM, maning > sambale wrote: >> It's exactly this node. I will post the bounds later >> >> On Sat, Jul 18, 2009 at 2:21 PM, Mark Burton wrote: >>> >>> Hi Maning, >>> The road intersection "Daang Hari" is exactly at the edge of my tile (made with splitter) routing does not work. But when I created another mapset without the splitter, routing works. http://www.openstreetmap.org/?lat=14.413996&lon=121.01714&zoom=18&layers=B000FTF >>> >>> Which part of this junction actually falls on the exact line of the >>> edge? It can't be the whole junction, just some part of it. >>> >>> Can you please post the XML bounds elements from the two tiles? It's >>> near the top of the OSM file and looks like this example: >>> >>> >> maxlon='-0.131836'/> >>> >>> Cheers, >>> >>> Mark >>> ___ >>> mkgmap-dev mailing list >>> mkgmap-dev@lists.mkgmap.org.uk >>> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev >>> >> >> >> >> -- >> cheers, >> maning >> -- >> "Freedom is still the most radical idea of all" -N.Branden >> wiki: http://esambale.wikispaces.com/ >> blog: http://epsg4253.wordpress.com/ >> -- >> > > > > -- > cheers, > maning > -- > "Freedom is still the most radical idea of all" -N.Branden > wiki: http://esambale.wikispaces.com/ > blog: http://epsg4253.wordpress.com/ > -- > -- cheers, maning -- "Freedom is still the most radical idea of all" -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ -- ___ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Re: [mkgmap-dev] cannot route when end node is at the tile edge
This is again overview map fault. Simply create bigger overview map, and it will work 2009/7/18 maning sambale > Here's areas.list result from splitter > > # List of areas > # Generated Mon Jul 13 21:55:45 PHT 2009 > # > 63240001: 215040,5447680 to 600064,5754880 > # : 4.614258,116.894531 to 12.875977,123.486328 > > 63240002: 215040,5754880 to 600064,5900288 > # : 4.614258,123.486328 to 12.875977,126.606445 > > 63240003: 600064,5447680 to 690176,5615616 > # : 12.875977,116.894531 to 14.809570,120.498047 > > 63240004: 600064,5615616 to 671744,5658624 > # : 12.875977,120.498047 to 14.414063,121.420898 > > 63240005: 671744,5615616 to 690176,5640192 > # : 14.414063,120.498047 to 14.809570,121.025391 > > 63240006: 671744,5640192 to 690176,5658624 > # : 14.414063,121.025391 to 14.809570,121.420898 > > 63240007: 690176,5447680 to 985088,5658624 > # : 14.809570,116.894531 to 21.137695,121.420898 > > 63240008: 600064,5658624 to 985088,5900288 > # : 12.875977,121.420898 to 21.137695,126.606445 > > On Sat, Jul 18, 2009 at 11:17 PM, maning > sambale wrote: > > Using the same data without splitting routing is OK (Screenshot-2.png) > > > > Now trying with tiled data (screenshot-5.png), mapsource cannot route > > (screenshot-3.png). > > If I zoom a little bit closer the other tile disappears > > (screenshot-6.png). I can confirm this both in mapsource and roadtrip > > > > On Sat, Jul 18, 2009 at 2:27 PM, maning > > sambale wrote: > >> It's exactly this node. I will post the bounds later > >> > >> On Sat, Jul 18, 2009 at 2:21 PM, Mark Burton wrote: > >>> > >>> Hi Maning, > >>> > The road intersection "Daang Hari" is exactly at the edge of my tile > (made with splitter) routing does not work. But when I created > another mapset without the splitter, routing works. > > > > http://www.openstreetmap.org/?lat=14.413996&lon=121.01714&zoom=18&layers=B000FTF > > >>> > >>> Which part of this junction actually falls on the exact line of the > >>> edge? It can't be the whole junction, just some part of it. > >>> > >>> Can you please post the XML bounds elements from the two tiles? It's > >>> near the top of the OSM file and looks like this example: > >>> > >>> maxlon='-0.131836'/> > >>> > >>> Cheers, > >>> > >>> Mark > >>> ___ > >>> mkgmap-dev mailing list > >>> mkgmap-dev@lists.mkgmap.org.uk > >>> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > >>> > >> > >> > >> > >> -- > >> cheers, > >> maning > >> -- > >> "Freedom is still the most radical idea of all" -N.Branden > >> wiki: http://esambale.wikispaces.com/ > >> blog: http://epsg4253.wordpress.com/ > >> -- > >> > > > > > > > > -- > > cheers, > > maning > > -- > > "Freedom is still the most radical idea of all" -N.Branden > > wiki: http://esambale.wikispaces.com/ > > blog: http://epsg4253.wordpress.com/ > > -- > > > > > > -- > cheers, > maning > -- > "Freedom is still the most radical idea of all" -N.Branden > wiki: http://esambale.wikispaces.com/ > blog: http://epsg4253.wordpress.com/ > -- > ___ > mkgmap-dev mailing list > mkgmap-dev@lists.mkgmap.org.uk > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > ___ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Re: [mkgmap-dev] cannot route when end node is at the tile edge
Hi Maning, I have a theory about why this is failing. To test my theory, please partition way 5046155 at node 33780792 so that the small segment that connects the two one-way streets together is a separate way (but still connected at the same end points. Having done that, please rebuild your map and see if the problem goes away. Cheers, Mark ___ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Re: [mkgmap-dev] cannot route when end node is at the tile edge
I forgot to say, make sure you don't change the position of any of the nodes. I just want the way split - nothing else changed. Thanks, Mark ___ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Re: [mkgmap-dev] cannot route when end node is at the tile edge
Hi Maning, Even better, don't partition the way as I requested but, instead, please try this patch and see if it makes any difference. Cheers, Mark diff --git a/src/uk/me/parabola/mkgmap/general/LineClipper.java b/src/uk/me/parabola/mkgmap/general/LineClipper.java index 55aa51d..9bf224d 100644 --- a/src/uk/me/parabola/mkgmap/general/LineClipper.java +++ b/src/uk/me/parabola/mkgmap/general/LineClipper.java @@ -135,11 +135,18 @@ public class LineClipper { assert t[1] <= 1; double d = 0.5; - if (t[0] > 0) - ends[0] = new Coord((int) (y0 + t[0] * dy + d), (int) (x0 + t[0] * dx + d)); + if (t[0] > 0) { + Coord c = new Coord((int) (y0 + t[0] * dy + d), (int) (x0 + t[0] * dx + d)); + if(!c.equals(ends[0])) +ends[0] = c; + } + + if (t[1] < 1) { + Coord c = new Coord((int)(y0 + t[1] * dy + d), (int) (x0 + t[1] * dx + d)); + if(!c.equals(ends[1])) +ends[1] = c; + } - if (t[1] < 1) - ends[1] = new Coord((int)(y0 + t[1] * dy + d), (int) (x0 + t[1] * dx + d)); return ends; } diff --git a/src/uk/me/parabola/mkgmap/general/RoadNetwork.java b/src/uk/me/parabola/mkgmap/general/RoadNetwork.java index 9bc6b83..5b8d8db 100644 --- a/src/uk/me/parabola/mkgmap/general/RoadNetwork.java +++ b/src/uk/me/parabola/mkgmap/general/RoadNetwork.java @@ -103,6 +103,9 @@ public class RoadNetwork { if(node1 == node2) log.error("Road " + road.getRoadDef().getName() + " (OSM id " + road.getRoadDef().getId() + ") contains consecutive identical nodes - routing will be broken"); +else if(arcLength == 0) { + log.error("Road " + road.getRoadDef().getName() + " (OSM id " + road.getRoadDef().getId() + ") contains zero length arc"); +} // Create forward arc from node1 to node2 Coord bearing = coordList.get(lastIndex + 1); ___ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Re: [mkgmap-dev] cannot route when end node is at the tile edge
Mark Burton schreef: > Even better, don't partition the way as I requested but, instead, > please try this patch and see if it makes any difference. Yes it does: SEVERE (RoadNetwork): Road Provincialeweg (OSM id 35165518) contains zero length arc And guess what? http://www.openstreetmap.org/browse/way/35165518 is the tunnel we were discussing before. V. ___ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Re: [mkgmap-dev] cannot route when end node is at the tile edge
Hi Valentijn, > Mark Burton schreef: > > Even better, don't partition the way as I requested but, instead, > > please try this patch and see if it makes any difference. > > Yes it does: > SEVERE (RoadNetwork): Road Provincialeweg (OSM id 35165518) contains > zero length arc > > And guess what? http://www.openstreetmap.org/browse/way/35165518 is the > tunnel we were discussing before. That's interesting. Unfortunately, just a few seconds ago I realised that the patch I asked Maning to try is wrong so I shall provide another one. Cheers, Mark ___ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev