Routing website using Gosmore routing engine

David Dean has been so kind to add support for the maxspeed tag in Gosmore. Routing results should become a bit more realistic with this change.

David also made a change that allows changes to the Gosmore routing definitions without the need to rebuild the .pak database files. This will speed-up testing different speed values for different kinds of transport on different kinds of roads a lot.

Last, David also changed Gosmore so that it can use the same .pak database file for different routing configurations (elemstyles). This will reduce the number of databases needed and therefore the amount of time before a planet dump is imported. For YourNavigation.org this could mean a reduction from 3-4 days to only 1-2 days.

Hi, I would like to join this routing engine development – improve the OpenLayers part little bit.

My questions are:

  • Where can I get the sources? The svn from wiki [1] does not work.
  • What is the license of the project? Is it BSD allready?

Jachym

[1] http://wiki.openstreetmap.org/index.php/YOURS

Good points and welcome as a future contributor. I haven’t uploaded the source into SVN yet (was busy with a major overhaul of my Garmin maps project) but I should really do this very soon (this evening?). The license is BSD.

Basically there are two versions of YOURS, the one you see on http://yournavigation.org and a developement version (which is a mess atm). The latter one is meant to support route via’s and route directions.

Update: the source is now in SVN.

Ouch, I just discovered that the routing database hasn’t been updated since the end of February. New databases were created each week but the website kept looking at an old version. This is fixed now.

Hi Lambertus,

i would like to see if i can use your route-service on a small website i’m building (OpenLayers, OpenStreetMap).

At the moment it seems that yournavigation.org isn’t working. I receive an error:
Status: An unexpected error occured in Gosmore:

Regards,
Steven

Yes, the Gosmore update process failed because of the API upgrade (and planet dumps that got broken because of that). Unfortunately this caused the existing Gosmore database files to be deleted. I’m already trying to build new databases but this will take a few days… Sorry about that.

No problem. I’ll have no problem filling this time with figuring out how to incorporate yournavigation in my own website. :slight_smile:

i’ll start with looking into the code of your site today.

bedankt,
Steven

Will these gosmore changes be published/released at some point ?

They are committed to the SVN repository afaik.

Mea culpa … scanned the top handful and saw 5-9 mos aged files and missed the handful of updates from 2 mos ago :roll_eyes:

Seems the routing is sometimes wrong.

Look at this route:

from (Halle (Saale), Germany)

11.970158,51.482192

to (Erfurt, Germany)

11.108871,50.916092

The pedestrian route and the shortest routes are ok, but the fastest route for cars goes to Poland…

Regards
Henk

I have no idea what’s going on there, my route goes via Antartica or does not compute at all :frowning: Other tests in different areas works fine…

Development update: I’ve added support for motorway=yes which implies that agricultural, .bicycles and pedestrians are not allowed

In the Wiki, you said you’d be supporting route via’s in a couple of weeks. When will this be available ? Since I’m presently just prototyping things, I’d also be glad to help with testing and alpha versions.

Hmm, did I say that? :stuck_out_tongue:

I have been working on via’s and directions and a complete website makeover but it all has stalled when the routable Garmin maps service took off and now because I’m in the process of moving to my new house. The code of this new version is a mess and not functional (but you can see where I’m going).

The harddisk of the server got full tonight (again). Unfortunately this broke the Gosmore database so routing isn’t working for the next few days…

The Gosmore database for Europe, Asia, Africa and Oceania is up-to-date again. America is next.

I’ve been looking over your code, and I noticed this in gosmore.php

echobig($kml, 1024);

Which would possibly be self defeating if the server uses deflate/gzip compression etc.

Also you don’t need the ?> at the end of the file, this just leads to problems if there is trailing blanks, better to not have it.

Thanks for reporting this. The echobig thing was hearsay and I just copied it… :slight_smile: Anyway, I replaced the whole echobig thing with just ‘echo $kml;’. I also enabled standard gzip compression to the .htaccess file and confirmed that the output is now gzipped when the client requests it.

I always thought that, when you ‘open’ the PHP code with ‘<?php' you'd always have to add the 'close' as well ('?>’). But I searched it up and found this. So, yes, you actually have to omit the closing php tag.

Thanks again.

North South America is up-to-date again. I’ll try to make backups first before copying new (and possibly corrupted) databases over older working ones :wink:

There is a limit of about 1280 usable byte per packet most of the time, however the TCP stack/NIC deals with this just fine all on it’s own you don’t need to do a thing about it.

As the link says, it’s optional if you have a closing tag or not, but they said the same thing I did, you don’t end up with problems of trailing white spaces which can cause issues if you don’t have the closing tag.