Routing website using Gosmore routing engine

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.

I finally fixed the GPX export function so that it uses a HTTP POST query instead of HTTP GET. This makes the export function to work even with long routes.

Two major things changed:

  1. Routing can now use waypoints.

  2. The routing API can return the route results in geoJSON format.

Also an IE 6.0 bug has been fixed.

The Gosmore database update for this week has been reversed because of weird routing results (at least in Europe): Gosmore seemed more interested in very small roads then motorways.

Possibly no database updates in the coming two weeks while trying to sort the problem.

Someone from a server in Denmark was hammering the API for days (or weeks, who knows) with about 20 requests per second on an automated manner. This interfered with normal users requests so I’ve blocked the source IP.

A new version of YOURS is released after a lot of work with large contributions from Milo van der Linden (thanks!) rewriting almost everything. This release brings a new -much better looking- interface, calculation of all route segments in parallel, additional transport types and a nice logo.

Screenshot of YOURS

Hi Lambertus,
The interface is very nicely done! Great improvement!

Does YOURS support housenumbers? I am looking for an free software routing service on OSM to check the housenumbers I entered. I also wrote a little tutorial on entering housenumbers and would like to cite your service as an example who would benefit from housenumbers.
http://wiki.openstreetmap.org/wiki/User:Longbow4u/Hausnummern_eintragen

Until now my housenumber queries have failed on yours.

Perhaps you could add a statistics page. It would be interesting to know how many route requests were delivered. Perhaps this would lead to more people contributing (as they see its worthwile).

Another idea would be a simple report mechanism for wrong routing instructions. For example: sometimes when I enter start and endpoint I get a wrong route. I would like to send a short bug report to the designer of the routing algorithm. This report should contain the permalink to my query, (start address, end address), version and date of the OSM-data used, version of the routing software used, date of the routing request, and a short description what went wrong (did not use this motorway but that primary road, did route on forest track instead of available main road etc.). The answers and links could be posted to a message board so that the algorithm designers could improve their software. I think feedback could be very helpful to them.

I would like to help you, but unfortunately I am not a programmer.
Thank you for your great work.

Longbow4u

Thank you :slight_smile:

No, because of two things:

  1. The OpenStreetMap Gazetteer does not support housenumbers (Gazetteer does the name to location conversion when you search by text).
  2. Gosmore (the routing engine) has the tendency to start/stop a route segment on the beginning or end of an OSM way. So it does not address position interpolation.

Yes, it’s on my todo list, but not very high atm.

I hope the developers of Gosmore welcome this, but they would get swamped with reports I’m afraid. There are so many parameters involved that a route is seldom perfect for anyone. There is a wiki page where weird routes could be reported, but reports got in so quickly that you can’t develop fast enough to keep up.

I agree that it would be useful, but I doubt that a special interface (as opposed to the wiki page) would give the developers much better information. There is already an extensive list of routes that pose some difficulty, the devs can check against that list first and ask for more (I could put up a link on the website then).

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.