You are not logged in.

#101 2010-06-08 18:15:11

Lambertus
Administrator
From: Apeldoorn (NL)
Registered: 2007-03-17
Posts: 3,269
Website

Re: Routing website using Gosmore routing engine

Well, here's to good hopes for more users party_7.gif


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#102 2010-06-10 11:04:50

inferno
Member
Registered: 2010-06-10
Posts: 3

Re: Routing website using Gosmore routing engine

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?

Offline

#103 2010-06-10 11:16:46

Lambertus
Administrator
From: Apeldoorn (NL)
Registered: 2007-03-17
Posts: 3,269
Website

Re: Routing website using Gosmore routing engine

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.


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#104 2010-06-10 12:00:46

inferno
Member
Registered: 2010-06-10
Posts: 3

Re: Routing website using Gosmore routing engine

Lambertus wrote:

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.

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

Lambertus wrote:

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.

Will there be soon a new version of Gosmore?

Offline

#105 2010-06-10 12:59:02

Lambertus
Administrator
From: Apeldoorn (NL)
Registered: 2007-03-17
Posts: 3,269
Website

Re: Routing website using Gosmore routing engine

inferno wrote:
Lambertus wrote:

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.

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

The limit is in the YOURS code. The commandline that calls Gosmore includes the Linux 'ulimit' tool. See http://trac.openstreetmap.org/browser/a … osmore.php on line 174. Remove that and Gosmore will run as long as it wants.


Lambertus wrote:

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.

Will there be soon a new version of Gosmore?

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


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#106 2010-06-10 13:25:31

inferno
Member
Registered: 2010-06-10
Posts: 3

Re: Routing website using Gosmore routing engine

Thanks a lot

Offline

#107 2010-06-10 16:18:34

stephan75
Member
Registered: 2008-05-28
Posts: 2,805

Re: Routing website using Gosmore routing engine

inferno wrote:

Will there be soon a new version of Gosmore?

The main developer of gosmore is Nic Roets. I have no idea whethet he is working on gosmore in these days. But when I emailed him about problems and bugs (beside the trac-system) he was answering quickly.

Greets Stephan

Offline

#108 2010-06-10 16:50:52

Lambertus
Administrator
From: Apeldoorn (NL)
Registered: 2007-03-17
Posts: 3,269
Website

Re: Routing website using Gosmore routing engine

The last contribution by Nic was 3 weeks ago, by other developers just 2 hours ago. So yes, Gosmore is definitely in active development.


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#109 2010-06-25 21:50:52

Lambertus
Administrator
From: Apeldoorn (NL)
Registered: 2007-03-17
Posts: 3,269
Website

Re: Routing website using Gosmore routing engine

inferno wrote:

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?

A little addition to what has been said before: there is no real limit. For instance: Gosmore will be more then happy to route you from Cape Town to Johannesburg (South Africa) which is a 1400km trip, or a 5000km trip through Russia or a 4500km trip crossing Austraia in a few seconds. But routing from the north of the Netherlands to the most southern tip (370 km) will take about 7 seconds when that section of the routing database has been cached in memory (otherwise it will take a while longer, about a minute). It depends on the road network density and available RAM.

The very limited amount of RAM on the server (2 GB) is proving to be a real bottleneck because, ideally, you want everything loaded and cached in RAM. The routing database for Europe, Asia, Africa and Oceania is currently 3.2 GB and North/South America is 4.8 GB. So if you want to do global routing then the server should have at least 8 GB RAM and preferably 12 GB. If you want to provide routing on a country level or smaller (I'm not talking about the USA) then a simple pc or laptop with 4GB RAM might do very well.

I've now updated the routing database behind yournavigation.org and moved to the latest Gosmore version. I hope this solves a lot of the routing problems, most noticeably the 'route via the Southpole' bug :-) I think this will make a lot of people happy...


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#110 2010-07-03 22:37:55

michaelcc
Member
Registered: 2010-07-03
Posts: 2

Re: Routing website using Gosmore routing engine

I was looking for a post more specifically inclined to YOURS but this seems to be the closest one I can find... This is actually about using something other than Gosmore for a routing engine.

I just wanted to say that I am excited about the quality of the application this far. It really has some potential to help SMB's implement highly custom routing applications. I noticed looking at the DEV branch for YOURS that you [Lambertus] are implementing the KIT routing engine.  Some months ago I stumbled upon their Google talk and have been interested in seeing it going opensource and being implemented as a backend in YOURS.  I have looked over the net for the source code of KIT's routing engine, but have been unable to locate a public repository.  So, I was wondering where your got it so that I may play with the current DEV version of YOURS with KIT.


Thanks,
Michael

Offline

#111 2010-07-04 13:59:10

Lambertus
Administrator
From: Apeldoorn (NL)
Registered: 2007-03-17
Posts: 3,269
Website

Re: Routing website using Gosmore routing engine

michaelcc wrote:

I was looking for a post more specifically inclined to YOURS but this seems to be the closest one I can find... This is actually about using something other than Gosmore for a routing engine.

I just wanted to say that I am excited about the quality of the application this far. It really has some potential to help SMB's implement highly custom routing applications. I noticed looking at the DEV branch for YOURS that you [Lambertus] are implementing the KIT routing engine.  Some months ago I stumbled upon their Google talk and have been interested in seeing it going opensource and being implemented as a backend in YOURS.  I have looked over the net for the source code of KIT's routing engine, but have been unable to locate a public repository.  So, I was wondering where your got it so that I may play with the current DEV version of YOURS with KIT.


Thanks,
Michael

Yes, YOURS has always been about implementing other opensource projects. It has never been solely linked to Gosmore, but so far Gosmore has been the only opensource routing engine that suited the purpose. On the other hand, I've had very big problems with Gosmore (which seem related to compiler versions, but this isn't clear yet) so I've been a bit more actively seeking for alternatives. So I contacted the researchers from KIT when made an announcement about making their CH routing available for OSM on the OSM routing mailinglist a few months ago. Since then there has been sporadic emailing between them and me and I've been testing a few development versions since. They have not released their code yet as they think it's not the time for that yet, but they have explicitly stated multiple times that it will eventually.

If we compare KIT (that's the name I have given it, I don't know how they have named the project) to Gosmore, then there are some striking differences:
KIT uses a very strict hierarchy which cannot be influenced on the fly. This means that they can optimise the hierarchy and achieve incredible speeds (especially much faster then Gosmore over large distances), but you can't ask it to avoid e.g. toll roads or ferry's when you included toll roads while constructing the hierarchy. Gosmore on the other hand is flexible, if you provide it with a different stylesheet at runtime then the route outcome will change accordingly. It also allows for a large number of transport types while using the same route database. This gives Gosmore an edge when it comes to providing 'the whole package' on a website like YOURS when resources are limited. Yes, routing with Gosmore is slower, but it's also more versatile.

So, looking into my chrystal ball, I can see a hybrid future where KIT will provide car routing and Gosmore all other transport types, but perhaps Nic Roets can improve Gosmore's speed as well, who knows. Situations change... I'll see.

Meanwhile, you can find an implementation of the KIT routing engine in YOURS at: http://www.yournavigation.org/kit/. The routing engine runs on a home computer of one of the researchers and contains the hierarchy for car routing in The Netherlands only, so you can play around a bit if you want. Note: this is development stuff, things might change, break and go offline without notice.


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#112 2010-07-05 02:16:59

michaelcc
Member
Registered: 2010-07-03
Posts: 2

Re: Routing website using Gosmore routing engine

Very cool.  Thanks for the quick reply.  I think KIT is a good name.... or perhaps Routing KIT.  Most of the time you only need shortest path only anyway so it should be adequate in most cases.  But Gosmore has a very long way from when I started playing with it a little of a year ago.  So kudos to the developers for that.

Michael

Offline

#113 2010-07-09 22:04:55

Lambertus
Administrator
From: Apeldoorn (NL)
Registered: 2007-03-17
Posts: 3,269
Website

Re: Routing website using Gosmore routing engine

The first release of the KIT routing engine is out and called OSRM. See the announcement here.


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#114 2010-09-28 14:11:47

chihuongbk
Member
Registered: 2010-09-28
Posts: 1

Re: Routing website using Gosmore routing engine

As an almost newbie to OSM world, I've taken a look at this topic and it seems that no one here got problem on setting up YOURS. I've setup YOURS on my localhost following exactly the wiki's instruction:
- install Gosmore into '/home/myname/gosmore' directory
- download a prebuild map as guided in Gosmore's wiki page, unzip, name it gosmore.pak and put it in '/home/myname/gosmore'
- put a copy of YOURS into my public html directory, '/home/myname/www/yours'
- correct the two vars of '/home/myname/www/yours/api/dev/gosmore.php', $www_dir = '/home/myname/www/yours'; $yours_dir = '/home/myname/gosmore';
Finally, i opened http://localhost/yours in FF. It appeared to work well but when I marked beginning point (or endpoint) it didn't display address as well as calculate route at all. I also tested Gosmore alone, and saw it work properly.
Did I miss doing anything? Can someone help me?

Last edited by chihuongbk (2010-09-29 16:19:17)

Offline

#115 2010-11-09 10:13:10

hamzad_cne
Member
Registered: 2010-11-09
Posts: 2

Re: Routing website using Gosmore routing engine

Hi "OpenStreetMap"pers,

I'm using Gosmore in a local routing website, but I have encountered the problem concerning roundabouts: gosmore DOES count oneways entering roundabouts, which is inconvenient. If anyone in this forum has already encountered this problem, and has a solution for it, please let us know about it.

Thanks everyone

Offline

#116 2010-11-09 14:07:28

Lambertus
Administrator
From: Apeldoorn (NL)
Registered: 2007-03-17
Posts: 3,269
Website

Re: Routing website using Gosmore routing engine

Sorry but I don't understand your problem. Can you elaborate a bit please?


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#117 2010-11-09 14:21:06

hamzad_cne
Member
Registered: 2010-11-09
Posts: 2

Re: Routing website using Gosmore routing engine

OK, I'll explain my issue.

I understand that Gosmore gives the routing result as a set of nodes, each node has it's coordinates and the junction type. If that node is part of a roundabout, the junction type would be "jr", and if the node is an exit from the roundabout, it would be "Jr".
The problem is that not all "Jr" nodes are exits; some are enterances.
In the file "libgosm.cpp", there's a comment that says:
//TODO: Don't count oneways entering the roundabout
That's where I'm stuck, because I need to count the right number of exits from a roundabout.
So, I'll be very graceful if you can help me with this issue.

Thank you

Last edited by hamzad_cne (2010-11-09 16:24:12)

Offline

#118 2011-01-10 14:06:03

Somnath Satav
Member
Registered: 2010-12-16
Posts: 19

Re: Routing website using Gosmore routing engine

YOURS is great.

Last edited by Somnath Satav (2011-01-20 07:34:27)

Offline

#119 2011-01-22 19:11:48

Arminus
Member
Registered: 2009-04-29
Posts: 62
Website

Re: Routing website using Gosmore routing engine

I wonder you difficult it would be to get gosmore to route ski tracks, in particular cross-country ski tracks. There are presently ~ 500 cross-country ski tracks on OSM, they ways that make them up are all tagged with piste:type=nordic (details on http://wiki.openstreetmap.org/wiki/User … r/Loipemap - sorry, German only). There is really no other restriction, that tag can be applied to existing (normal) ways - or new ways can be created for those tracks. The latter are not highways of any type, just ways with that tags as described

Any suggestions ? I'm not familiar with the gosmore source code, but I did spot some maybe promising rules in elemstyles.xml - are these only used for rendering or also for routing ?

Thanks,
Armin

Offline

#120 2011-01-26 18:41:14

Toshiro
Member
Registered: 2011-01-25
Posts: 2

Re: Routing website using Gosmore routing engine

I understand YOURS uses Gosmore Routing Engine, but I want to know if there is a way to use Gosmore to "host" the maps, instead of connecting to OSM Tile server (tile.openstreetmap.org), so I can connect YOURS on my web server obtaining the same output as Gosmore?

Offline

#121 2011-01-26 19:52:44

Lambertus
Administrator
From: Apeldoorn (NL)
Registered: 2007-03-17
Posts: 3,269
Website

Re: Routing website using Gosmore routing engine

hamzad_cne wrote:

OK, I'll explain my issue.

I understand that Gosmore gives the routing result as a set of nodes, each node has it's coordinates and the junction type. If that node is part of a roundabout, the junction type would be "jr", and if the node is an exit from the roundabout, it would be "Jr".
The problem is that not all "Jr" nodes are exits; some are enterances.
In the file "libgosm.cpp", there's a comment that says:
//TODO: Don't count oneways entering the roundabout
That's where I'm stuck, because I need to count the right number of exits from a roundabout.
So, I'll be very graceful if you can help me with this issue.

Thank you

I have never answered this because I do not develop the routing engine, but I just realise that this should have been my answer: it's best to contact the author of Gosmore for things like this. Apologies.

Arminus wrote:

I wonder you difficult it would be to get gosmore to route ski tracks, in particular cross-country ski tracks. There are presently ~ 500 cross-country ski tracks on OSM, they ways that make them up are all tagged with piste:type=nordic (details on http://wiki.openstreetmap.org/wiki/User … r/Loipemap - sorry, German only). There is really no other restriction, that tag can be applied to existing (normal) ways - or new ways can be created for those tracks. The latter are not highways of any type, just ways with that tags as described

Any suggestions ? I'm not familiar with the gosmore source code, but I did spot some maybe promising rules in elemstyles.xml - are these only used for rendering or also for routing ?

Well, there are multiple solutions possible, but this is actually quite easy (depending on all the details like uphill sections etc., but the outlines at least are easy) if you pre-process the data so that you translate ski tracks to highways. Then routing should work out of the box (I assume that you're using gosmore as routing engine only, not to display the data). There are plenty of C, Perl or Python scripts in the OSM svn repository that can be used as an example for this.

I can imagine a SAX parser that reads from stdin, checks certain ski key/value pairs and replaces them with highways alternatives before outputting to stdout. The stdout can subsequently be read by gosmore for it's database generation.

An entirely different approach could be to add the ski track key/value pairs in the elemstyles.xml, add e.g. motorcar speeds, remove motorcar speeds for other entries in the elemstyles.xml and request a route for a car. This could be very, very easy but I'm not entirely sure if that would work. But I would certainly try this option first.

Toshiro wrote:

I understand YOURS uses Gosmore Routing Engine, but I want to know if there is a way to use Gosmore to "host" the maps, instead of connecting to OSM Tile server (tile.openstreetmap.org), so I can connect YOURS on my web server obtaining the same output as Gosmore?

I don't think that is possible. Gosmore renders the OSM data on a canvas of the application. A slippymap like tile.openstreetmap.org is a set of stored and rendered images which are then served using a webserver.

If you want to make sure that Gosmore uses the same data as the underlying map then you can download the planet dump or a planet extract and use that for Gosmore's database generation AND for your own Mapnik tileserver. But I think it's quite challenging to setup a local slippymap covering the world (disk space, memory, cpu power, network bandwidth (if you have many users)).


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#122 2011-03-08 09:09:37

Arminus
Member
Registered: 2009-04-29
Posts: 62
Website

Re: Routing website using Gosmore routing engine

Lambertus wrote:

I can imagine a SAX parser that reads from stdin, checks certain ski key/value pairs and replaces them with highways alternatives before outputting to stdout. The stdout can subsequently be read by gosmore for it's database generation.

That works nicely, thanks for the hint !

Offline

#123 2011-03-18 12:41:45

Lambertus
Administrator
From: Apeldoorn (NL)
Registered: 2007-03-17
Posts: 3,269
Website

Re: Routing website using Gosmore routing engine

Driving directions documentation.

This is how the instructions is currently implemented in gosmore.php ($showInstructions is configured from the gosmore.php parameters):

if ($showInstructions) {
    $command = $query." ./gosmore ".$pak. " 2>/dev/null | sed 'y/\"/_/' | ".
        "(cd ../routing-instructions/src/tools/translations; LANG=".$lang." ../../../build/src/routing-instructions/routing-instructions --dense 2>/dev/null)";
} else {
    $command = $query." ./gosmore ".$pak. " 2>/dev/null";
}

Test an example by calling e.g. http://www.yournavigation.org/api/dev/r … ructions=1

Note: route.php is a new script that functions as a proxy for route requests. There are currently two servers running the Gosmore route engine (one provided by yournavigation.org and one provided by Nic Roets - the author of Gosmore). Based on some simple decision rules the requests are relayed to any of the available servers (I could add more servers when they become available, even alternative routing engines if available).

The updated files should appear in SVN soon, but need some stabilising and cleaning up first. The YOURS wiki page will also be updated accordingly ofcourse.


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#124 2011-03-28 12:28:13

Valentijn
Member
Registered: 2009-06-04
Posts: 51

Re: Routing website using Gosmore routing engine

Feature request (in English for general readability). "Openrouteservice.org" has a useful feature, named "Accessibility Analysis". Could that please be put on the wishlist for Yournavigation.org? Combined with "Cycle routing"? It would even be more useful if combined with an "avoid X" feature; thus, you could use it to find out the results of, for example, construction works, for reachability of places.

Offline

#125 2011-05-11 08:13:16

Somnath Satav
Member
Registered: 2010-12-16
Posts: 19

Re: Routing website using Gosmore routing engine

Hi All,

I am using YOURS in my web application.Its working fine.
I am showing the total distance for the calculated route, I want to show time for the same. Is this possible?

Offline

Board footer

Powered by FluxBB