Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bicycle=yes and access=no #323

Closed
emmexx opened this issue Jul 5, 2012 · 3 comments
Closed

bicycle=yes and access=no #323

emmexx opened this issue Jul 5, 2012 · 3 comments

Comments

@emmexx
Copy link

emmexx commented Jul 5, 2012

Take a look at this route
http://map.project-osrm.org/OO

In the demo the speed profile is for cars but I get the same route when using a bicycle profile.
Via San Prospero has the following tags:
highway=residential
bicycle=yes
access=no

In real life I'd go straight from start to target, it's a 60-70 meters trip, not a 1.33 km one. :-(

In ExtractorCallBacks.h at lines 220-221 w.access is set to false and prevails over bicycle=yes, if I understand the code correctly.
OSM wiki says:
"bicycle yes Where bicycles are permitted, overriding default access..."
http://wiki.openstreetmap.org/wiki/Bicycle

If there's no work on this part of the code I'll try to patch it.

maxx

@lapinos03
Copy link

I encountered this issue too. So I patched it straight away :

            //Okay, do we have access to that way?
            if(0 < access.size()) { //fastest way to check for non-empty string
                //If access is forbidden, we don't want to route there.
                if((access == "no" /*lapinos03*//*|| access == "agricultural" || access == "forestry" || access == "delivery"*/)
                   /*lapinos03*/ && !("yes" == accessTag || "designated" == accessTag)
                   ) { //Todo: this is still hard coded
                    w.access = false;
                }
                if(settings.accessRestrictionKeys.find(access) != settings.accessRestrictionKeys.end()) {
                    w.isAccessRestricted = true;
                }
            }

(I also removed the tests on agricultural, forestry, etc... for my needs)

@emiltin
Copy link
Contributor

emiltin commented Jul 5, 2012

this pull request might be of interest: emiltin@599c026

you can also try running the cucumber tests to see check what effects the change has. adding/modifying tests are also possible :-)

@DennisOSRM
Copy link
Collaborator

Will be fixed with implementation of issue #1. Therefore closing as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants