Project-OSRM / osrm-backend

Open Source Routing Machine - C++ backend
http://map.project-osrm.org
BSD 2-Clause "Simplified" License
6.28k stars 3.31k forks source link

[osrm-web] wrong address after routing #307

Closed emmexx closed 12 years ago

emmexx commented 12 years ago

I notices this problem using Dennis Schiefer web interface to osrm. After calculating the route 2 requests of reverse geocoding for start and end are executed in order to put in the relative textboxes the "real" addresses found by osrm. But since Nominatim isn't perfect sometimes happens that nominatim returns a "generic address", probably because it couldn't found an address. I think this is a Nominatim bug but this has bad consequences for osrm-web. I mean I search for a route between Main Street and Main Square, the found route is right but in the Start or End textboxes I see another street that has nothing to do with my request. I searched the nominatim documentation but I couldn' find a way to get information about a reverse geocoding not found. As a workaround could it be possible to limit the reverse geocoding to a small area around the location of the request, in order to get a failed request or an address that is near the address and not kilometers away.

Any comment?

thank you maxx

DennisOSRM commented 12 years ago

@DennisSchiefer

DennisSchiefer commented 12 years ago

Could you please add a link to the route so I can test for myself if using different Nominatim options can solve this problem? You can limit the reverse geocoding to an area, but this should only benefit lookup speed and not quality. But I'll give it a try.

emmexx commented 12 years ago

Il 06/28/2012 09:31 AM, DennisSchiefer scrisse:

Could you please add a link to the route so I can test for myself if using different Nominatim options can solve this problem? You can limit the reverse geocoding to an area, but this should only benefit lookup speed and not quality. But I'll give it a try.

First of all thank you for your work. We started yesterday a "service" for bicycle users in Milan (Italy) using osrm and osrm-web.

I made minor changes to the interface and I would like to know if there's something I should do about publishing copyright or other "legal matters". But this another matter.

You can test the problem on the osrm map. Choose as starting address: Via Vincenzo Foppa, Milano (choose the 3rd address) Choose as target address: Piazza Napoli, Milano

The route description is ok. As it is correct on the map. But in the start and target textboxes the addresses are wrong. As you can see the starting address gets changed to Via San Barnaba that is 2-3 kilometers from via Foppa (and the 2 streets are not in connection). The target address gets changed too, this time to the address of a street that is near the requested address.

Many user complained about this because the interface is not working as expected, even if the routing is correct.

I already checked the requests to nominatim and the problem is the answer, not the request.

Thank you maxx

p.s. I noticed another problem in via points. The target icon changes position and weird routes appear. This happens with the github version but not on osrm map. Do you have any plan to update github and fix this problem?

DennisSchiefer commented 12 years ago

Regarding your PS, which version did you check out? The head of the master branch should be exactly the same as what is presented online. The current version is 0.1.6.

Maybe you have an older version? There was a change in the format how routes with via points are send by the server.

DennisOSRM commented 12 years ago

First of all thank you for your work. We started yesterday a "service" for bicycle users in Milan (Italy) using osrm and osrm-web.

Yes, I have noticed http://www.milanobicimap.it/ in our log files. Please also change the check for the timestamp to your server as well. We are happy to see that people started adopting the code for their own projects. I see that your service is not commercial, right?

I made minor changes to the interface and I would like to know if there's something I should do about publishing copyright or other "legal matters". But this another matter.

According to AGPL you need to publish the source to your version of the web-interface somewhere.

emmexx commented 12 years ago

Il 06/28/2012 11:39 AM, DennisSchiefer scrisse:

Regarding your PS, which version did you check out? The head of the master branch should be exactly the same as what is presented online. The current version is 0.1.6.

Maybe you have an older version? There was a change in the format how routes with via points are send by the server.

I downloaded it about 6 weeks ago: OSRM.VERSION = '0.1.6'; OSRM.DATE = '120516';

I downloaded the zip file, I don't know pretty well git.

Thank you maxx

emmexx commented 12 years ago

Il 06/28/2012 11:50 AM, Project OSRM scrisse:

First of all thank you for your work. We started yesterday a "service" for bicycle users in Milan (Italy) using osrm and osrm-web.

Yes, I have noticed http://www.milanobicimap.it/ in our log files.

Bingo! ;-)

Please also change the check for the timestamp to your server as well.

I don't understand what you mean, sorry.

We are happy to see that people started adopting the code for their own projects. I see that your service is not commercial, right?

Correct. We are a pro bike association, Fiab Ciclobby onlus. Together with another association, ACTL, and with financial support from a foundation, we mapped all the streets of the city of Milan. We checked only 3-4 parameters (surface, speed and a new parameter specific for cyclists). I'm working on osrm-code to get better results...

According to AGPL you need to publish the source to your version of the web-interface somewhere.

We should publish the sources somewhere? I mean, isn't it enough that the sources are viewable and downloadable from the site itself? Anyway, it's not a problem to publish the sources, it's only that I'm working on the code, I'd like to publish the sources once I'm finished. Now there's a link to your github page in our Software page: http://www.milanobicimap.it/progetto/progetto

I'd like to work on the code to get the interface to work a little bit better and to have some more option:

I'll be happy to contribute the code if you like it and find it interesting.

bye maxx

DennisSchiefer commented 12 years ago

Hm, this should be the correct version for the webclient.

Which version of the server do you use?

emmexx commented 12 years ago

Il 06/28/2012 01:25 PM, DennisSchiefer scrisse:

Hm, this should be the correct version for the webclient.

Which version of the server do you use?

DennisOSRM-Project-OSRM-57b3f42

I didn't find a version number in the code.

The timestamp of the folder in my pc is june the 12th.

bye maxx

emiltin commented 12 years ago

hi @emmexx, great to see other people using osrm for bike routing! believe i mentioned earlier, but we're working on a bike router for copenhagen, denmark. we're creating a variation of the UI build with rails 3 and backbone. dev version at http://ibikecph-staging.herokuapp.com/, code at https://github.com/ibikecph/osrm-rails/tree/dev - it's all still work in progress though.

what speedprofile are you using?

emmexx commented 12 years ago

Il 06/28/2012 02:04 PM, Emil Tin scrisse:

hi @emmexx, great to see other people using osrm for bike routing! believe i mentioned earlier, but we're working on a bike router for copenhagen, denmark. we're creating a variation of the UI build with rails 3 and backbone. dev version at http://ibikecph-staging.herokuapp.com/, code at https://github.com/ibikecph/osrm-rails/tree/dev - it's all still work in progress though.

Yes, you mentioned another site: http://stormy-flower-5599.herokuapp.com/en At the moment I'm satisfied with the standard interface but I'll keep in mind yours. Whatever works for bikes in Denmark should work in Italy too! :-)

what speedprofile are you using?

I tried many speedprofiles, the one in the root of the sources, the one in the speedprofile folder, a customised one with an almost constant speed value.

I added some rules to osrm code, in ExtractorCallbacks as you suggested, in order to chenge the weight of edges, based on surface, maxspeed and the new parameter I talked about in my previous comments. But since I can only lower or rise the speed, the result are non very satisfying. Most of the routes don't obey my will. :-)

In Milan there are not so many cycleways and there's nothing like a network as in Copenhagen or Amsterdam. So it would be nice to be able to suggest to use a cycleway when there's one on the way. But almost always the "normal" way gets choosen. I suppose that the speed differences are not enough to let the routing algorythm choose a cycleway or a way without certain surface characteristics.

As I already wrote I'd be glad to contribute to the development of the new rules. I made a crash course in orienteering in osrm code, I'm making progress every day. :-)

bye maxx

DennisOSRM commented 12 years ago

On 28.06.2012 13:08, emmexx wrote:

Il 06/28/2012 11:50 AM, Project OSRM scrisse:

First of all thank you for your work. We started yesterday a "service" for bicycle users in Milan (Italy) using osrm and osrm-web.

Yes, I have noticed http://www.milanobicimap.it/ in our log files.

Bingo! ;-)

Please also change the check for the timestamp to your server as well.

I don't understand what you mean, sorry.

change this line in OSRM.config.js to point to your server:

HOST_TIMESTAMP_URL: 'http://router.project-osrm.org/timestamp'

Each of your visitors is making a request to our demo site right now.

We are happy to see that people started adopting the code for their own projects. I see that your service is not commercial, right?

Correct. We are a pro bike association, Fiab Ciclobby onlus. Together with another association, ACTL, and with financial support from a foundation, we mapped all the streets of the city of Milan. We checked only 3-4 parameters (surface, speed and a new parameter specific for cyclists). I'm working on osrm-code to get better results...

According to AGPL you need to publish the source to your version of the web-interface somewhere.

We should publish the sources somewhere? I mean, isn't it enough that the sources are viewable and downloadable from the site itself? Anyway, it's not a problem to publish the sources, it's only that I'm working on the code, I'd like to publish the sources once I'm finished. Now there's a link to your github page in our Software page: http://www.milanobicimap.it/progetto/progetto

And you have to publish also all the changes that you make to the server (excluding config files).

emmexx commented 12 years ago

Il 06/28/2012 05:30 PM, Project OSRM scrisse:

change this line in OSRM.config.js to point to your server: HOST_TIMESTAMP_URL: 'http://router.project-osrm.org/timestamp' Each of your visitors is making a request to our demo site right now.

Sorry, I didn't notice that parameter.

And you have to publish also all the changes that you make to the server (excluding config files).

Ok, I'll do that too.

Thank you maxx

emiltin commented 12 years ago

@emmexx if you change the time enough, bike tracks will be selected, but travel time will be incorrect. a more flexible solutions for parsing tags is being worked on by @DennisOSRM.

DennisOSRM commented 12 years ago

Notified the Nominatim people about the bug. Closing it here since there is not much we can do about that.