Routing website using Gosmore routing engine

Hi Lambertus,
The new interface looks great! A few remarks:

  1. the behaviour of dragging the waypoints on the map and moving them is a bit difficult, sometimes it works, sometimes not
  2. by adding more waypoints the left windowframe becomes longer, but there is no slider to move downwards. So the find route button dissapears from the screen and cannot be reached (Firefox 3.5, screensize 1280x800 on my 15.6inch laptop)

You can activate a waypoint by clicking the icon and then click again on the map to place the icon. Dragging the icon is not possible.

Ah, yes that correct. I’m busy fixing the CSS and behavior of the site so it works in IE too and try to fix this at the same time.

Thanks for the feedback.

This looks FANTASTIC. Very promising, and already quite useful for me (I’m bicycle-only).
I am having an issue getting our greenway trail (gravel, foot & bike only, connects to other roads) to route both foot traffic (works great when bike is selected). the osm wiki says highway=cycleway should read this correctly, and have even tried putting in foot=yes. Is this a bug or a mistake on my part?

Lambertus, thanks for your code. Nice work. We are developing on it as well. I’d like to add some code contributions myself. How can I help?

The server, on which you host yournavigation.org, is it a standalone server, or a server with a control panel (like directadmin)? If you host only yournavigation.org and you have full control over it, please use varnish cache in front of the apache server. This can improve the speed of your API dramaticly, because those requests will be cached. I can help you if you want. The current code you are using for the API can be improved in speed much more, that it currently does. Currently every request is send through gosmore, but that isn’t necessary.

By the way, please use json_encode instead of building your own json code, in /dev/gosmore.php. Because that won’t generate faulty JSON code.

It’s most likely because the database for routing is getting very old. I’m having big problems with latest Gosmore versions to compile and run correctly under Linux AMD64. There is little time to work on it as well. There has been some back and forward mailing with the Karlsruhe uni about implementing their routing algo, but it has died slowly somehow, I really should spend more time on YOURS…

The server is a sponsored virtual machine with directadmin CP, I don’t have too much control over it but the sponsor’s IT fella has an interest in OSM and is always willing to help out.

Regarding the caching: I’ve been checking logs for a while and re-occuring routes with all parameters identical are very very rare. IMHO. not worth the trouble in configuring and maintaining a caching server. Linux itself is already helping by caching the section of the routing database that are in demand. Subsequent queries in the same area are much quicker then the first (you can see this already by requesting the same route a few times, the first is slow but subsequent queries are much faster (usually few hundreds of a second). Maintainability and ease of use is a big plus for someone who doesn’t have much time so unless you have some numbers showing a huge effect I’d rather not use a caching server. However you can use a caching server for your own instance ofcourse.

As you might have noticed, I’m not a webdeveloper by profession, so I’m sure there will be many possible improvements to be made. I hadn’t heard of the json_encode() function before, it seems useful indeed. I believe the faulty JSON code is already fixed earlier this week, or is it still broken?

You ask if you can help: well sure, you are welcome to! As you probably know, YOURS is in the OSM SVN which has a TRAC interface through which feature requests, bugs and other improvements can be coordinated. If you have some bits of code on specific issues you can post them there, mail them to me (osm [monkeytail] na1400 [dot] info) or start a branch in SVN. We can discuss things using e.g. osm or osm-dev IRC channels. Btw, do you have an example of ‘We are developing on it as well’? I’d like to see what others have made of it… :slight_smile:

Hi,
What’s the difference between options “bicycle” and “bicycle Route” ?

Are Turn-Restrictions working ?

Chris

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).