trouble routing across extracts

Hi all, Using splitter on the US state extracts from Geofabrik, I am unable to route across state boundaries. On my Oregon 450 I get "route calculation error" after it sits at 80% for a while. If I combine the extracts before splitting, then routing works. Is this a known limitation? Would it be feasible to teach splitter how to combine the extracts internally before splitting? If not, what would it take to get mkgmap's routing to work across split extracts? DETAILS: The following produces a gmapsupp.img that does not support routing across state boundaries: STATES="massachusetts connecticut" for s in ${STATES}; do wget http://download.geofabrik.de/osm/north-america/us/${s}.osm.pbf done java -jar splitter.jar --no-trim *.osm.pbf java -jar mkgmap.jar --gmapsupp --route -c template.args The following produces a gmapsupp.img that works as expected: combine() { unset args for f in "$@"; do case ${f} in *.osm.pbf) r="--rb";; *) r="--rx";; esac args="${args} ${r} ${f} --sort${args+ --merge}" done osmosis ${args} --wb combined.osm.pbf } rm -f combined.osm.pbf combine *.osm.pbf java -jar splitter.jar --no-trim combined.osm.pbf java -jar mkgmap.jar --gmapsupp --route -c template.args Thanks, Richard

El 13/01/12 22:44, Richard Hansen escribió:
Hi all,
Using splitter on the US state extracts from Geofabrik, I am unable to route across state boundaries. On my Oregon 450 I get "route calculation error" after it sits at 80% for a while.
If I combine the extracts before splitting, then routing works.
Is this a known limitation? Would it be feasible to teach splitter how to combine the extracts internally before splitting? If not, what would it take to get mkgmap's routing to work across split extracts?
You need to cut your desired region from a bigger extract, e.g, us-south.osm.pbf and then split it with splitter, or cut it directly with splitter supplying it a pre-made areas.list file. Geofabrik extracts are cut with osmosis and mkgmap needs information of "what is there on the other side" of the extract that is missing after the cut. You can even have some gaps between extracts after merging, so routing is not guaranteed to work with your procedure.
DETAILS:
The following produces a gmapsupp.img that does not support routing across state boundaries:
STATES="massachusetts connecticut" for s in ${STATES}; do wget http://download.geofabrik.de/osm/north-america/us/${s}.osm.pbf done java -jar splitter.jar --no-trim *.osm.pbf java -jar mkgmap.jar --gmapsupp --route -c template.args
The following produces a gmapsupp.img that works as expected:
combine() { unset args for f in "$@"; do case ${f} in *.osm.pbf) r="--rb";; *) r="--rx";; esac args="${args} ${r} ${f} --sort${args+ --merge}" done osmosis ${args} --wb combined.osm.pbf } rm -f combined.osm.pbf combine *.osm.pbf java -jar splitter.jar --no-trim combined.osm.pbf java -jar mkgmap.jar --gmapsupp --route -c template.args
Thanks, Richard _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- Por favor, no me envíe documentos con extensiones .doc, .docx, .xls, .xlsx, .ppt, .pptx, .mdb, mdbx Instale LibreOffice desde http://es.libreoffice.org/descarga/ LibreOffice es libre: se puede copiar, modificar y redistribuir libremente. Gratis y totalmente legal. LibreOffice está en continuo desarrollo y no tendrá que pagar por las nuevas versiones.

On 2012-01-13 17:06, Carlos Dávila wrote:
El 13/01/12 22:44, Richard Hansen escribió:
Hi all,
Using splitter on the US state extracts from Geofabrik, I am unable to route across state boundaries. On my Oregon 450 I get "route calculation error" after it sits at 80% for a while.
If I combine the extracts before splitting, then routing works.
Is this a known limitation? Would it be feasible to teach splitter how to combine the extracts internally before splitting? If not, what would it take to get mkgmap's routing to work across split extracts?
You need to cut your desired region from a bigger extract, e.g, us-south.osm.pbf and then split it with splitter, or cut it directly with splitter supplying it a pre-made areas.list file. Geofabrik extracts are cut with osmosis and mkgmap needs information of "what is there on the other side" of the extract that is missing after the cut. You can even have some gaps between extracts after merging, so routing is not guaranteed to work with your procedure.
There is enough data to successfully route, otherwise combining them before splitting would not work. So there must be a bug/limitation in splitter or mkgmap that prevents mkgmap from seeing how the two extracts connect. -Richard

On Jan 13, 2012, at 2:35 PM, Richard Hansen wrote:
There is enough data to successfully route, otherwise combining them before splitting would not work. So there must be a bug/limitation in splitter or mkgmap that prevents mkgmap from seeing how the two extracts connect.
this has been discussed 100s of times. Don't expect this to work. and for detailed explanations you can search the archives. even there is enough date in some cases and it seems to work for you there will be data will be missing in other locations. This methodology is broken by design it's a total waste of time to try to make it work in splitter and mkgmap or even to restart a discussion about it.
-Richard _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

This combinining-extracts approach used to work for me. I used cloudmade state extracts (back when they were updated regularly). My understanding was that the extracts had enough data beyond the boundaries so that when neighboring extracts were fed to splitter one ended up with connected ways. Then, after a lull in map building, I used geofabrik state extracts and found that I couldn't route across state lines. Certainly I can see that this won't work in general if there isn't a node across the line in one or the other extracts so that the resulting union of datasets isn't connected. But if the union is connected, it seems that routing should work. (And, I believe that people have added near-state-line nodes in some cases to make the state-union routing work. My point is that even if it's theoretically impossible for the scheme to be correct, it can work well enough to be highly useful.) My desire to use state extracts stems from wanting to update massachusetts much more frequently than others -- or whatever states I'm about to be in, but still build new england maps. While I could use us-northeast, that puts more load on Frederik's server, and there is no solution for the region boundaries. So are you saying that the geofabrik extracts don't contain any nodes across the borders? Do the ways (that in fact cross the borders) then stop short of the border? How did this used to work with cloudmade extracts?

I am not saying it can't work. But fact is that the extracts don't align always and there are different cut algorithms. Some keep the whole way, others drop nodes outside the cut polygon and the last even drops the reference to the node in the way. so yes merging can work if all data is kept and merged correct. But how can you ever be sure all connections are kept? If you know what you are doing and understand the possible failures then it's fine. But if someone claims there is a bug or a broken tool chain then this is just wasted time. and again this has been discussed to dead already. On Jan 13, 2012, at 3:25 PM, Greg Troxel wrote:
This combinining-extracts approach used to work for me. I used cloudmade state extracts (back when they were updated regularly). My understanding was that the extracts had enough data beyond the boundaries so that when neighboring extracts were fed to splitter one ended up with connected ways. Then, after a lull in map building, I used geofabrik state extracts and found that I couldn't route across state lines.
Certainly I can see that this won't work in general if there isn't a node across the line in one or the other extracts so that the resulting union of datasets isn't connected. But if the union is connected, it seems that routing should work.
(And, I believe that people have added near-state-line nodes in some cases to make the state-union routing work. My point is that even if it's theoretically impossible for the scheme to be correct, it can work well enough to be highly useful.)
My desire to use state extracts stems from wanting to update massachusetts much more frequently than others -- or whatever states I'm about to be in, but still build new england maps. While I could use us-northeast, that puts more load on Frederik's server, and there is no solution for the region boundaries.
So are you saying that the geofabrik extracts don't contain any nodes across the borders? Do the ways (that in fact cross the borders) then stop short of the border? How did this used to work with cloudmade extracts?
participants (4)
-
Apollinaris Schoell
-
Carlos Dávila
-
Greg Troxel
-
Richard Hansen