problem routing across tiles again

Hi, I encountered routing across tiles again. Using mkgmap ver 1163 and splitter r83. This photo shows routing detours to the cemetery when I used a split file: http://farm3.static.flickr.com/2593/3892530364_d80a7546b4_o.png But no problems when no split file was used: http://farm3.static.flickr.com/2499/3891743809_21048450de_o.png -- cheers, maning ------------------------------------------------------ "Freedom is still the most radical idea of all" -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ ------------------------------------------------------

Just to add my mkgmap options: time java -Xmx1512m -jar /home/maning/osm/routable_garmin/mkgmap/trunk/dist/mkgmap.jar \ --code-page=1252 \ --ea \ --tdbfile \ --latin1 \ --country-abbr=PHI \ --country-name=PHILIPPINES \ --remove-short-arcs=5 \ --route \ --road-name-pois \ --add-pois-to-areas \ --family-id=639 \ --family-name="OSM_PHIL" \ --overview-mapname=40000001 \ --series-name="OSM_PHIL" \ --description="OSM_PHIL" \ --generate-sea \ --style-file="/home/maning/osm/routable_garmin/svn/styles/experimental_master_style" \ /home/maning/osm/20090902/split_file/*.osm.gz On Sun, Sep 6, 2009 at 6:23 PM, maning sambale<emmanuel.sambale@gmail.com> wrote:
Hi,
I encountered routing across tiles again. Using mkgmap ver 1163 and splitter r83.
This photo shows routing detours to the cemetery when I used a split file: http://farm3.static.flickr.com/2593/3892530364_d80a7546b4_o.png
But no problems when no split file was used: http://farm3.static.flickr.com/2499/3891743809_21048450de_o.png
-- 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/ ------------------------------------------------------

Just to confirm the I tested with a different areas.list and the same problem persist on the specific road On Sun, Sep 6, 2009 at 6:25 PM, maning sambale<emmanuel.sambale@gmail.com> wrote:
Just to add my mkgmap options:
time java -Xmx1512m -jar /home/maning/osm/routable_garmin/mkgmap/trunk/dist/mkgmap.jar \ --code-page=1252 \ --ea \ --tdbfile \ --latin1 \ --country-abbr=PHI \ --country-name=PHILIPPINES \ --remove-short-arcs=5 \ --route \ --road-name-pois \ --add-pois-to-areas \ --family-id=639 \ --family-name="OSM_PHIL" \ --overview-mapname=40000001 \ --series-name="OSM_PHIL" \ --description="OSM_PHIL" \ --generate-sea \ --style-file="/home/maning/osm/routable_garmin/svn/styles/experimental_master_style" \ /home/maning/osm/20090902/split_file/*.osm.gz
On Sun, Sep 6, 2009 at 6:23 PM, maning sambale<emmanuel.sambale@gmail.com> wrote:
Hi,
I encountered routing across tiles again. Using mkgmap ver 1163 and splitter r83.
This photo shows routing detours to the cemetery when I used a split file: http://farm3.static.flickr.com/2593/3892530364_d80a7546b4_o.png
But no problems when no split file was used: http://farm3.static.flickr.com/2499/3891743809_21048450de_o.png
-- 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/ ------------------------------------------------------

Hi Maning,
I encountered routing across tiles again. Using mkgmap ver 1163 and splitter r83.
This photo shows routing detours to the cemetery when I used a split file: http://farm3.static.flickr.com/2593/3892530364_d80a7546b4_o.png
But no problems when no split file was used: http://farm3.static.flickr.com/2499/3891743809_21048450de_o.png
Hmm, yes, really tricky this one. The tile has been split at a point that is close enough to a node that the resulting arc is of zero length but the coordinates of the two nodes are not so close as to be considered the same. If the split had actually been slightly closer to the node on the left, I believe the routing would work as expected as the split point and the left hand node would have had the same map coordinates. The issue here is that short arc removal is done before the tile's bounding box is applied so it is possible for short arcs to be created when the tile is clipped. A little while back I attempted to do the clipping before the short arc removal but that had bad issues as well so, at this time, I don't have a plan to solve this issue. Sorry. What might work is if we can somehow tweak the arc to make it usable. Can you please save the tile files so that if I (or anyone else, of course) come up with a fix in the future, you could test it. Cheers, Mark

Hi Maning, I had an inspiration! Contrary to my last message, I think we can probably do something about this. Please try the attached patch on the same OSM data as before and see if the routing changes (hopefully, for the better). Use the same options as before. It's based upon my previous attempt at clipping the ways before the short arc removal is done, but it doesn't actually clip the ways, it just detects where the ways hit the boundary. Cheers, Mark

Mark, Using the latest svn 1173 patch -p1 < /home/maning/Desktop/mb-make-boundary-nodes-v1.patch patching file src/uk/me/parabola/mkgmap/general/LineClipper.java patching file src/uk/me/parabola/mkgmap/reader/osm/xml/Osm5XmlHandler.java maning@cumingi:~/osm/routable_garmin/mkgmap/trunk$ ant dist Buildfile: build.xml prepare: [mkdir] Created dir: /home/maning/osm/routable_garmin/mkgmap/trunk/build/classes compile: [javac] Compiling 272 source files to /home/maning/osm/routable_garmin/mkgmap/trunk/build/classes [javac] Note: /home/maning/osm/routable_garmin/mkgmap/trunk/src/uk/me/parabola/mkgmap/general/RoadNetwork.java uses or overrides a deprecated API. [javac] Note: Recompile with -Xlint:deprecation for details. [javac] Note: Some input files use unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. build: [copy] Copying 35 files to /home/maning/osm/routable_garmin/mkgmap/trunk/build/classes dist: [mkdir] Created dir: /home/maning/osm/routable_garmin/mkgmap/trunk/dist [mkdir] Created dir: /home/maning/osm/routable_garmin/mkgmap/trunk/dist/doc/api [jar] Building jar: /home/maning/osm/routable_garmin/mkgmap/trunk/dist/mkgmap.jar [copy] Copying 8 files to /home/maning/osm/routable_garmin/mkgmap/trunk/dist/doc [copy] Copying 34 files to /home/maning/osm/routable_garmin/mkgmap/trunk/dist BUILD SUCCESSFUL Total time: 6 seconds Same routing problem. The problematic segment is approx 6 meters On Mon, Sep 7, 2009 at 4:38 AM, Mark Burton<markb@ordern.com> wrote:
Hi Maning,
I had an inspiration!
Contrary to my last message, I think we can probably do something about this. Please try the attached patch on the same OSM data as before and see if the routing changes (hopefully, for the better).
Use the same options as before.
It's based upon my previous attempt at clipping the ways before the short arc removal is done, but it doesn't actually clip the ways, it just detects where the ways hit the boundary.
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/ ------------------------------------------------------

Hi Maning,
Same routing problem. The problematic segment is approx 6 meters
That's a shame, I had great hopes for the patch. It would be useful if I had the OSM files for the two tiles in question. Can you please zip them up (gzip or zip) and either email them to me or make them available on a website for me to grab. Cheers, Mark

mark, here are the files http://dl.getdropbox.com/u/607635/osmph_split/split_file_osmphilippines.tar.... the problem road is here: http://osm.org/go/4zhDAROFE-- On Mon, Sep 7, 2009 at 3:26 PM, Mark Burton<markb@ordern.com> wrote:
Hi Maning,
Same routing problem. The problematic segment is approx 6 meters
That's a shame, I had great hopes for the patch.
It would be useful if I had the OSM files for the two tiles in question. Can you please zip them up (gzip or zip) and either email them to me or make them available on a website for me to grab.
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/ ------------------------------------------------------

Hi Maning, Thanks for the files. I have found the problem that was stopping the new code from working as expected (it was an old bug in the line clipping code). So, please test the new patch. I have tried it myself on your data files and it works OK as long as you give --remove-short-arcs=5. If you just use --remove-short-arcs, it still can't route across the boundary correctly. Not 100% sure why that is so. If you look at the map, you will see that it now merges those two nodes together at the boundary. Not perfect from a visual point of view, but at least the routing works. Cheers, Mark

wohoo! routing works. The merging of points is a good solution. Does this affect only the nodes along the clipped line? Thanks! Just in time for this months upcoming philippine map release. On Mon, Sep 7, 2009 at 5:58 PM, Mark Burton<markb@ordern.com> wrote:
Hi Maning,
Thanks for the files.
I have found the problem that was stopping the new code from working as expected (it was an old bug in the line clipping code).
So, please test the new patch. I have tried it myself on your data files and it works OK as long as you give --remove-short-arcs=5. If you just use --remove-short-arcs, it still can't route across the boundary correctly. Not 100% sure why that is so.
If you look at the map, you will see that it now merges those two nodes together at the boundary. Not perfect from a visual point of view, but at least the routing works.
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/ ------------------------------------------------------

Maning,
wohoo! routing works. The merging of points is a good solution. Does this affect only the nodes along the clipped line?
It affects all nodes that need merging to avoid a short arc being created. Any connected nodes whose separation is less than the specified distance (5m in your case), will be merged. Nodes that lie on the boundary are considered immovable so that they will match the nodes in the adjacent tile. This should work for all scenarios except for the case where both of the end points of a clipped way lie on a boundary and that way's length is smaller than the critical distance. Not sure if there's a good solution to that case.
Thanks! Just in time for this months upcoming philippine map release.
Excellent. I shall commit this fix and also the subdivision tweaks. Cheers, Mark
participants (2)
-
maning sambale
-
Mark Burton