I'm searching for an application or API that does routing. I only need the route and length/time of the route. After doing some research I had the impression gosmore is the appropriate one. I have downloaded and built it according to the wiki http://wiki.openstreetmap.org/wiki/Gosmore#Downloading_and_running. I'm using ubuntu 10.04.2 but didn't take the ubuntu one because I want it to run it headless. First I tried a ready made .pak file to try gosmore out. But whatever QUERY_STRING I've provided, no route is found by gosmore. Then I tried to rebuild the pak file from a german osm data file. First it ended with a 3k sized .pak file. Then I recognized it needs somehow the elemstyles.xml. The next try was to do the rebuild in the source directory of gosmore where all these files are. But doing this
I get
So now I'm not really sure to where head next. It is a situation like often that a lot of people seem to use it and are satisified and then there are a few where it doesn't and not much help to solve. Documentation is just not existent. Did I do something terribly wrong? Is there a better library for routing then gosmore? Any hints appreciated. asked 14 Apr '11, 12:42 Norbert Hartl |
This web site is not intended to be a bug tracking system. If you look at Gosmore's Wiki page you will find a reference to the trac system where you can report problems. If I were to guess from the error message, I'd say maybe your machine has run out of memory. Did you monitor memory usage while running the program? I think gosmore is well suited for what you have in mind. There are other systems around that you could use just as well, for example Routino or OSRM, both of which are AGPL licensed and support (only) headless operation. answered 14 Apr '11, 12:51 Frederik Ramm ♦ Well, often a question looks like a ticket even if it isn't intended :) And it sometimes hard to ask the right things if you are really new to some technology. Thanks for the hint to monitor the memory. I was just assuming it can deal with low mem situation itself. I'm monitoring now
(14 Apr '11, 13:03)
Norbert Hartl
|
My first guess is that you created an incompatible relations.tbl file. If you did, you can delete it and rebuild without it (it is not important for routing). You can also disable some of the code with the
But it can be a completely unrelated bug. answered 14 Apr '11, 12:53 Nic Roets I did not cerate a relations.tbl. I do not know what it is for. And the second line in the log says "Processing without relations table".
(14 Apr '11, 12:58)
Norbert Hartl
I'm glad I came back so I found the second option for only routing. Nice now it works. It is just strange (well) that I get only time based information per leg and not distance. Where to ask this? :)
(14 Apr '11, 16:19)
Norbert Hartl
Gosmore does not produce the distance because the values used internally are not particularly accurate. Approximating the distances from lat/long is quite easy e.g. using the equirectangular projection. Or you can use the YOURS php wrapper, some versions of which will also generate instructions. Note that the "time" values are not accurate for shortest route.
(14 Apr '11, 16:40)
Nic Roets
|
Ok, I got something back. Thanks, guys. The conversion of germany osm with gosmore rebuild ate happily 3GB of main memory. Before I only had a little bit more than 2GB free and thought it would be sufficient. So the thing (the error) in my question is due to memory limit. And with the self converted pak file I get routing information while I wasn't successful with the prebuilt paks.