Routing website using Gosmore routing engine

Bicycle is the same as car routing or pedestian routing etc. Bicycle Route is preferring routes mapped with a bicycle route relations.

There is some basic turn-restriction support. The Gosmore wiki page used to point to a specific version of the relation:restriction wiki page, but that has changed so I don’t know exactly which types and configurations.

Yes, that was my guess, but it don’t seems to work:

The way over the routes (left) is only little longer than the calculated route, so I expected
another calculation.

Chris

Yes, that’s not optimal obviously …

I just had a quick look at the request logs and it appears that a cycleroute request is treated as a normal bicycle routing request. Clearly a bug and I’ll fix it asap.

Thanks for reporting this!

I want to use gosmore and yours in a navigation application for android and i was wondering if you can say something about the uptime of the server.

i’m going to use the address http://www.yournavigation.org/api/1.0/gosmore.php.

thanks in advance

Hahaha,

this fucking piece of shit called gosmore is good for nothing. I never saw such a buggy and shitty thing. The only question I have is, what did the craftsman (I won’t write developer, don’t want to call him so because real developer might consider that offensive and insulting) smoke and how much did he drink while cobble this masterpiece of fucking shit?

Sincerely,
NixKoenner

Leave the insults at home next time, thanks.

So, you think that Gosmore is rubbish eh? Can you provide an alternative routing engine that is able to handle the OSM planet dump and runs on a modest machine?

@NixKoenner After insulting gosmore on talk-de as well, how about you go an troll somewhere else. But I guess your Name sais it all.

Wow, this is a great service. I’d like to use it for OpenMobileMaps (http://omm.mine.nu). Right now, I’m using openrouteservice.org for route calculation, but unfortunately it’s limited to europe only.
Thank you for making YOURS!

I haven’t looked into the API of YOURS atm, but I’ve seen, that there seems to be one online. Do I need to know anything else to implement it? Something that is not covered in your wiki?
Right now, I’m counting about 4000 online users for OpenMobileMaps. Round about 500 people were using it over the past 7 days; approx. 80 unique users per day. Can these amounts cause any problems to YOURS?

Hi - The routing service looks like a great concept. A question: I tried to test it to find Foot- and Bicycle- routing on a designated foot+bicycle trail. However it seemed to avoid the trail as shown in this example: . I checked it out on the Wiki, but can’t tell if the foot routing is supposed to be functional. The trail attributes are highway=path , foot=designated, bicycle=designated

Thanks for any tips.

Sorry for not responding earlier, I’ve missed your post…

You are correct, there is currently only one YOURS API online, but everyone is free to setup another one and even using another routing engine isn’t difficult. There’s not much to it and most of it is covered in the wiki, especially API 1.0.

Everyone is welcome to use the API as long as it doesn’t overwhelm it. In those cases I would like the 3rd party API user to setup their own API. This situation hasn’t happened yet. Under normal circumstances 80 unique users shouldn’t be a problem unless…:

  • It sometimes happens when one or a few ppl are requesting very long routes. In that situation the routing database cannot be cached in the available RAM (2 GB) which causes the harddisk to start seeking which slows the whole process of route calculation down to a crawl. Two solutions would help with this: lots of ram or harddisks with very high I/O throughput (SSD), neither are currently in place.
  • There are huge problems in processing the OSM planet dump by the routing engine (updating the routing database). This has led to problems which are pointed out by MikeN; the OSM map is up to date but the routing database is not so it looks like the routing does weird things like avoiding certain routes.

I’m trying to fix these problems through a few actions and changes:

  • Split up the world in large sections and hoping that Gosmore is able to complete the routing database update but this is slow work due to the amount of data that needs to be processed on each attempt. This will get the database updated but will break the capability (although slow) to calculate very long routes
  • Add support for a different routing engine(s). I have my eyes on one that incorporates contraction hierarchies algorithms from KIT (Karlsruhe Institiute of Technology), but it will take a while for it to become available.
  • Allow multiple routing API’s to spread the load by round robin-like techniques or by geography. The latter might perhaps interest e.g. the OSM USA community and will also reduce the memory (or I/O subsystem) requirements as more of the routing database will be able to fit into RAM.
  • As a nifty alternative: I’m thinking about getting a few ARM Cortex A8 or A9 boards and use those as a power efficient distributed routing cluster… might prove cost efficient compared to a single very beefed-up server doing all the work by itself…

So the bottom line is: routing database is currently not up to date and the service may reject your route request now and then when the service is locked down by some long route request(s). If you can live with this then you’re welcome to use the service. I’m sorry I can’t provide anything more robust, but it’s just an opensource/hobby project with no proper funding.

I have implemented your service in the latest release of OpenMobileMaps (1.4). It works fine for now. And, I even get better usage statistics: in a 5 minutes window there are an average of 5 unique phones online. Let’s hope they are not calculating long routes. :smiley:
But, I also implemented some fallbacks. If your server rejects the requests, then I’m trying to let openrouteservice.org calculate the route. I guess we will have to see if OpenMobileMaps has an noticeable impact on your server. Of course, I’m sending an X-Yours-client HTTP header.

Thank you for providing the service!

Seems like a very smart thing to do :slight_smile:

Thanks!

No problem. Thanks for actually using yournavigation.org :wink:

I’m making some progress in updating the gosmore routing database by splitting the world in smaller but overlapping boxes. This will mean I can provide regular updates again soon, but at the cost of very long routes (the ones that don’t fit into any single box). Ofcourse the API will return a relevant error message when this happens.

Edit: This day until now (11:00h CET) there have been 12 requests from OpenMobileMaps

Just some statistics, because stats are cool…

There have been 2703 requests yesterday which is a bit higher compared to the average 2500 requests per day. So on average one request every ~30 seconds :sunglasses: !

Requests yesterday:
Unreferenced API users: 1560
Yournavigation.org: 635
tracks4bikers: 218
OpenMobileMaps: 77
ParkenApp: 53
gvSIG: 50
OpenMaps: 48
OpenSatNav: 32
MySpeed: 23
YOURS OSM wiki page: 6
CarPark: 1

An unreferenced API user is someone who accesses the YOURS API through a 3rd party application/website, so by far the biggest group of users is coming from applications/websites that do not identify themselves. I’ve checked a few of those requests and they all originate from Belarus or the Russian Federation…

Yes, stats are definitely cool. :smiley:
So, OMM is already on the 2nd place amongst registered applications. I think this number will be doubled in the next few weeks. Because, there is still a significant number of users who are using the old version of OMM (without YOURS).

Well, here’s to good hopes for more users

Hi Lambertus,

Thanks for your Code. It’s definitely cool.

Is it possible to resolve 200 km limit, if we install Gosmore to our server?

There is no real hard limit in Gosmore. It’s just my experience that, depending on the road density, Gosmore has more trouble finding a route over longer distances. This is somewhat expected as Gosmore is primarily developed to run on mobile devices which don’t have the storage capabilities to handle such large areas. It also depends on the server, the one behind yournavigation.org only has 2GB ram to serve the whole world which means Gosmore/Linux is constantly swapping bits of the routing database in and out of ram which slows things down considerably. Therefore there is a limit to the time Gosmore is allowed to run on a single route request to prevent a single search to lock the entire server down. Last, the Gosmore instance on yournavigation is old, it might very well be possible that a newer version doesn’t suffer as much from this.

In short: your mileage may vary…

Of course, if you can lay hands on a different routing engine that doesn’t have this drawback then that could probably easily be integrated into YOURS.

Where this time limit? In your code or in Gosmore? As far as I understand, Gosmore has no limit.

Will there be soon a new version of Gosmore?

The limit is in the YOURS code. The commandline that calls Gosmore includes the Linux ‘ulimit’ tool. See http://trac.openstreetmap.org/browser/applications/routing/yours/trunk/www/api/dev/gosmore.php on line 174. Remove that and Gosmore will run as long as it wants.

Gosmore is available through http://wiki.openstreetmap.org/wiki/Gosmore (it points to the OSM svn repository: http://trac.openstreetmap.org/browser/applications/rendering/gosmore)

Thanks a lot