OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.

#201 2014-02-06 12:16:39

haroldship
Member
Registered: 2014-01-28
Posts: 12

Re: Routing website using Gosmore routing engine

Lambertus wrote:

I don't really understand why you need a fix, for updating the whole planet works well without the patch. Have you made changes to the elemstyle.xml?

Perhaps a list of all the issues I encountered get YOURS going would help. Many are just differences between the instructions and what I had to do. Other were actual changes I had to make that are bugs.

Setup:
VM with 4 cores, 16GB RAM, 120GB hard disk. Ubuntu Saucy (13.10).

Gosmore:
- First I tried to install it on RHEL. Gave up because I could not get required libraries installed.
- Moved to Ubuntu, because I saw that gosmore is part of the universe repo.
- Tried to build the planet, died on disk space.
- Tried to build americas, stuck in infinite loop with 100%CPU
- Tried to build from source - core dump on 'make install' so opened https://trac.openstreetmap.org/ticket/5110
- Fixed the above on my local machine, built americas. Had already replaced elemstyles.xml with http://www.yournavigation.org/elemstyles.xml.routing which you sent me.

RoutingInstructions:
- Tried to install RoutingInstructions - some errors in their instructions. Opened bug (already fixed)

YOURS:
- Tried to install YOURS - web site opened but routing api (both 1.0 and dev) fail.
- yours.js refers to api/dev/route.php but only found gosmore.php. created a symlink.
- location of gosmore executable is hard-coded in gosmore.php. It's different for 1.0 and dev. I created 2 symlinks.
- names and locations of gosmore americas.pak and eurasia.pak files are hard-coded in gosmore.php.
- names and locations of styles files are hard-coded in gosmore.php. Used the above for all 3.
- GeoJSON returned by api/1.0/gosmore.php is not valid (spurious comma on last coordinate)
- fixed above locally (api/dev version is ok)
- Opened a bug https://trac.openstreetmap.org/ticket/5113

In the YOURS section, I believe a few updates in the doc would save the next installer from having to debug the scripts. In particular, it could state that gosmore executable or link to it must be in the yours directory, and what the names and locations of the .pak files are.

For the xml files, I don't know what the difference should be. It would be helpful if they were included in the repo with instructions on where to put them.

Regarding the spurious comma in api/1.0/gosmore.php, it is a bug that prevents GeoJSON from working in 1.0.

In any case, the site is up and running. My teammates and managers are really impressed - it works beautifully. I plan to add the eurasia database some time in the future.

Thanks for all your help along the way,
Harold Ship

Offline

#202 2014-02-06 13:31:29

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

Re: Routing website using Gosmore routing engine

Hah, thanks for the writeup.

I know that YOURS isn't very easy to setup and not everything is consistent, but it's nice to see that someone else can make it work by fixing (mainly) a few hard-coded paths. Thanks also for the bugreports smile

Regarding elemstyles.xml: I built the gosmore.pak twice. Once with the default elemstyles and one with only routing related info. The resulting PAK files were identical in size, so it appears not to make a difference when using Gosmore with the compiler option ROUTING_ONLY enabled.


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#203 2014-02-25 12:08:27

pmars
Member
From: The Netherlands
Registered: 2010-10-17
Posts: 35
Website

Re: Routing website using Gosmore routing engine

The website seems to be out of service: http://www.yournavigation.org/

hmm

Last edited by pmars (2014-02-25 12:08:57)

Offline

#204 2014-03-19 14:04:35

haroldship
Member
Registered: 2014-01-28
Posts: 12

Re: Routing website using Gosmore routing engine

Hi all

I am running a local copy of YOURS, and my users have noticed that my APIs don't return 'traveltime', although the hosted version at http://www.yournavigation.org does.
Is there something I need to do to get this working?

Harold Ship

Offline

#205 2014-03-20 15:57:59

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

Re: Routing website using Gosmore routing engine

Also replied by email yesterday, but for completeness my answer:
====
The Gosmore routing engine provides an estimated time to destination on each node in it's output. The first node in Gosmore's output should contain the total trip time (Gosmore outputs the route in reverse order).

See the documentation of the output elements here:
http://wiki.openstreetmap.org/wiki/Gosm … _Interface

I hope this helps.


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#206 2014-03-21 16:05:20

packhamster
Member
Registered: 2014-03-19
Posts: 1

Re: Routing website using Gosmore routing engine

Harold,

I had the same problem and Lambertus was kind enough to send me his version of the gosmore.php file. Note that you will need to update his local path references (shown below) to your settings:

…
// Geographic pak file selection
$pak = '';
if ($flon < -30) {
	// American continents (North and South)
	$pak = '/home/lambertus/gosmore/america/gosmore.pak';
} else {
	// Europe, Asia, Africa and Oceania continents
	$pak = '/home/lambertus/gosmore/eurasia/gosmore.pak';
}

if (file_exists($pak)) {
	$dir = '/home/lambertus/gosmore/';
…

You will also need another file called geography.class.php which needs to be in the same directory as the gosmore.php file. I'll send you both files in an email. (i'd post them here but don't see an option - anyone who can can help me with posting these files here…?)

      - hp -

Offline

#207 2014-03-21 16:28:56

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

Re: Routing website using Gosmore routing engine

Thanks packhamster. I'll add that you don't really need the geography.class.php file. The gosmore.php file also contains two alternative functions to calculate the distance between nodes, they are currently commented out. To use these simply uncomment the functions (GreatDistance and/or Haversine) and replace the call to geography class with the getDistance() function. These functions are probably a bit less accurate then the geography class although unnoticeable for short trips, but they're slightly faster especially because the geography provides a vincenty option which is used by default but is requires more calculations. Alternatively use the query option 'distance' and set it to 'gc' or 'h' as documented here.

It's nice to see how well Gosmore actually scales. While originally intended as a mobile routing engine it powers yournavigation.org with worldwide routing and handled more then 700.000 route requests on january 16th. I expect yournavigation.org will be able to scale way beyond 1 million requests per day with the addition of a new server (Core i7-4770 and 32 GB ram), courtesy of Lobo.at. I plan to show the results of some intense benchmarking shortly.

I'm still very interested in a sponsoring of (temporary) access to a server with 64 GB ram which I'd like to use for experimenting (and hopefully add as routing backend) with the OSRM routing engine.


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#208 2014-03-27 12:55:52

jwt8070
Member
Registered: 2014-03-25
Posts: 2

Re: Routing website using Gosmore routing engine

Hi,

We use Yournavigation.org in a tourism application to get walking directions from one city attraction to another.   In the walking directions, we sometimes see things like below:

   Go straight ahead. Follow the road for 0.0 mi.
   Turn right. Follow the road for 0.0 mi.
   Turn sharp right into Piazza di Trevi. Follow the road for 0.0 mi.
   Continue on Via Poli. Follow the road for 0.0 mi.

We think the reason why we see so many "0.0 mi" is that there is the short walking distance between each turn.  Since the distance value shows only one digit after the decimal point, the last two digits were left off.  Normally one should see "0.034 mi" or "0.045 mi", etc.   

Is there a way for us to get the distance value displayed with three digits after the decimal point in the walking directions?

Also, it seems that the distance metric is always in mile.  Is there a setting to change the distance metric to kilometer, meter, or foot?

Your help will be appreciated.

Offline

#209 2014-03-27 14:09:55

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

Re: Routing website using Gosmore routing engine

Currently the units (metric of imperial) is determined by the "lang" query parameter. Please see the following examples.

Dutch: http://www.yournavigation.org/api/1.0/g … =1&lang=nl

Rechtdoor op Burglaan. De weg vervolgen naar 40 m.

English (British): http://www.yournavigation.org/api/1.0/g … lang=en_GB

Continue on Burglaan. Follow the road for 40 m.

English (US): http://www.yournavigation.org/api/1.0/g … lang=en_US

Continue on Burglaan. Follow the road for 0.0 mi.

Default is en_US.

Unfortunately I have no control over the number of digits in the directions. But you may notice that the metric output changes automatically between meters and kilometers while the imperial output is always in miles, again this is behavior I don't have control over. A simple and slightly humorous fix in your app replaces '0.0 mi' with 'a few feet'... wink

I've asked the author of RoutingInstructions to automatically change mi to feet for short distances.


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#210 2014-03-28 10:22:10

jwt8070
Member
Registered: 2014-03-25
Posts: 2

Re: Routing website using Gosmore routing engine

Lambertus,

Thank you for the quick reply.  We played with the "lang" setting in our queries and saw how the distance unit changed according to the "lang" parameter.  However, we notice that the total travel distance value of the route remains the same for en_GB and en_US.  So if the travel distance was 1.5 miles in en_US, it will be 1.5 kilometers in en_GB.   We can make the km/mile conversion on our side, but how do we know which value is correct, 1.5 mile (based on en_US) or 1.5 km (based on en_GB)?

Offline

#211 2014-03-30 06:25:49

haroldship
Member
Registered: 2014-01-28
Posts: 12

Re: Routing website using Gosmore routing engine

Hi

FYI in Britain they also use miles. You might try Canada or Australia.

Offline

#212 2014-03-30 20:34:57

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

Re: Routing website using Gosmore routing engine

jwt8070 wrote:

Lambertus,

Thank you for the quick reply.  We played with the "lang" setting in our queries and saw how the distance unit changed according to the "lang" parameter.  However, we notice that the total travel distance value of the route remains the same for en_GB and en_US.  So if the travel distance was 1.5 miles in en_US, it will be 1.5 kilometers in en_GB. We can make the km/mile conversion on our side, but how do we know which value is correct, 1.5 mile (based on en_US) or 1.5 km (based on en_GB)?

That's a good observation! The total distance is calculated by a geography class (I could just take the value from Gosmore but don't) and is always metric (km).

I've updated the documentation of the parameters in the wiki which will hopefully prevent confusion for future new API users.

haroldship wrote:

FYI in Britain they also use miles. You might try Canada or Australia.

The RoutingInstructions applications clearly returns metric units for en_GB (and also for en_CA and en_AU).

Wikipedia says about Brittain:

British law now defines each imperial unit in terms of the metric equivalent. The metric system is in official use within the United Kingdom for most applications; however, use of Imperial units is still widespread amongst the public and all UK roads still primarily use the imperial system except for tonnage on main roads.

Ambiguous...


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#213 2014-05-23 08:13:58

shura0
Member
Registered: 2012-04-14
Posts: 245

Re: Routing website using Gosmore routing engine

Hello!
Is service supported yet?
Some bug report. Permalink to built route quite broken.
For example I have built route, it displayed correct, then I go to permalink and see: http://www.yournavigation.org/?flat=55. … ayer=cycle
Seems like site provide two possible routes, first one is for car and second is for bicycle. After pushing to "Find route" button site displays only route for bicycle, correct.

Thank you for your service!

Offline

#214 2014-05-30 03:13:33

wvmarle
Member
Registered: 2014-05-30
Posts: 1

Re: Routing website using Gosmore routing engine

Feature request: I'd like to have a way to set my default location/zoom level. Every time I open yournavigation.org it shows the world map, I always have to search for my location (the "share location" function doesn't work; not sure why but it seems to be an ISP level issue as no other service can get my location reliably).

Any way to have this done? In my case specifically to set it to show Hong Kong.

Offline

#215 2014-05-30 17:08:35

Bible Quotes
Member
From: Florida
Registered: 2014-05-30
Posts: 3
Website

Re: Routing website using Gosmore routing engine

Does anyone know of an open source routing api to use with a GPS tracking software.  Friend at http://www.crowtracker.com is interested in routing solutions but its almost all american users.  I see a bunch of web based ones like http://www.yournavigation.org/ etc but needs an API.


Praise be to the LORD my Rock, who trains my hands for war, my fingers for battle. Bible Quotes

Offline

#216 2014-05-30 20:43:04

shura0
Member
Registered: 2012-04-14
Posts: 245

Re: Routing website using Gosmore routing engine

Offline

#217 2014-05-30 21:45:30

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

Re: Routing website using Gosmore routing engine

Bible Quotes wrote:

Does anyone know of an open source routing api to use with a GPS tracking software.  Friend at http://www.crowtracker.com is interested in routing solutions but its almost all american users.  I see a bunch of web based ones like http://www.yournavigation.org/ etc but needs an API.

YOURS (yournavigation.org) has an open API that is used quite a lot by GPS tracking software. Documentation is here


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#218 2014-08-19 14:14:45

Allroads
Member
Registered: 2011-03-05
Posts: 2,745

Re: Routing website using Gosmore routing engine

Today I was making a route for moped. Control.
http://www.yournavigation.org/?flat=52. … yer=mapnik

But the route proposal took the main road. fastest

On the main road, I set a moped=no 28-1-2014

The map data you used is from: Routing data from planet file: 2014-03-05

Route problem.
Moped must use the way next to the main road.

Situation:
http://mijndev.openstreetmap.nl/~allroa … TTTTTTTTTF

Offline

#219 2014-08-19 16:54:59

Allroads
Member
Registered: 2011-03-05
Posts: 2,745

Re: Routing website using Gosmore routing engine

My mistake not hit find route by switch to moped.
Now he make a other turn.
Now taken a small part of motor_vehicle=no
http://mijndev.openstreetmap.nl/~allroa … FFFFFFFFFF

and de permalink
made this
http://www.yournavigation.org/?flat=52. … yer=mapnik

Last edited by Allroads (2014-08-19 16:55:34)

Offline

#220 2014-09-07 09:33:02

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

Re: Routing website using Gosmore routing engine

Routing database has been updated. Usage of yournavigation.org is slowly increasing: on some days it handles more then 550.000 unique route requests.

Edit September 8th: Some users informed me about a problem with some empty routing results. This is the result of a problem with one of the servers that handles route requests for Eurasia/Africa. This has now been fixed, I'm sorry for any inconvenience.


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#221 2014-10-23 23:25:42

lucb1e
Member
Registered: 2014-04-20
Posts: 40

Re: Routing website using Gosmore routing engine

Linked some friends to yournavigation. They noticed a bug and figured out how to reproduce it: do another route request before the old one returned/completed.

They then took this to the next level tongue
A couple creations:

kktt5.jpg

XjRU6.jpg

http://snag.gy/zB1g9.jpg
http://snag.gy/2B2Hw.jpg
http://snag.gy/VISw6.jpg

I guess the easy fix is to check in Javascript whether a newer request already returned before showing the result of a random request. And clearing the map when the result returns instead of just when the request is made. Or we consider it art and leave it be tongue

Last edited by lucb1e (2014-10-23 23:35:28)

Offline

#222 2014-10-24 07:56:31

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

Re: Routing website using Gosmore routing engine

Pretty images smile

Looks like lightning, including green and red sprites!

"Routinglightning"


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#223 2014-10-30 00:20:46

Stefan de Konink
Member
From: Leidschendam
Registered: 2009-05-13
Posts: 85
Website

Re: Routing website using Gosmore routing engine

A small maintenance announcement. Tomorrow we will upgrade the Dutch OpenStreetMap infrastructure with a bit more recent hardware. This basically implies the existing yours server will be removed from the rack and there should be some DNS remapping done. While I can promise the new infrastructure will most likely be powered on at 11:00 CET, it is unlikely that yours will be running before Friday, main reason being: I could not get a hold of Lambertus in the last days.


Steun elkaar, Kopieer Nederland waar!

Offline

#224 2014-11-03 10:55:02

amfan
Member
Registered: 2014-11-03
Posts: 1

Re: Routing website using Gosmore routing engine

Hi,

The API @ yournavigation.org is still down. Do you have an indication on when it's back online? Thanks

Offline

#225 2014-11-03 23:33:26

Stefan de Konink
Member
From: Leidschendam
Registered: 2009-05-13
Posts: 85
Website

Re: Routing website using Gosmore routing engine

For that to happen I need the help from Lambertus...


Steun elkaar, Kopieer Nederland waar!

Offline

Board footer

Powered by FluxBB