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

Car profile should discard construction highways #4230

Closed
daniel-j-h opened this issue Jul 3, 2017 · 5 comments
Closed

Car profile should discard construction highways #4230

daniel-j-h opened this issue Jul 3, 2017 · 5 comments

Comments

@daniel-j-h
Copy link
Member

We check for avoid.construction here

https://github.com/Project-OSRM/osrm-backend/blob/master/profiles/lib/handlers.lua#L475

but do not have it in the car profile's avoid sequence here

https://github.com/Project-OSRM/osrm-backend/blob/master/profiles/car.lua#L107-L114

we have it in the bike profile, though.

@danpat
Copy link
Member

danpat commented Jul 7, 2017

@daniel-j-h under-construction highways are tagged as highway=construction - the construction value of the highway= key is not a value we recognize in the car profile, so the road won't be included.

A quick test with profiles/debug_example.lua shows that the car profile doesn't include highway=construction tags:

$ lua debug_car.lua
{
  highway = 'construction',
  name = 'Magnolia Boulevard'
}
=>
{
  backward_mode = 1,
  backward_speed = -1,
  duration = 0,
  forward_mode = 1,
  forward_speed = -1,
  road_classification = {}
}

It looks like the bicycle.lua profile behaves differently here - all highway= tags are considered valid, except for items in the avoid list:

Here, I've removed avoid.construction, and the bicycle profile includes the way:

$ lua debug_bicycle.lua
{
  highway = 'construction',
  name = 'Magnolia Boulevard'
}
=>
{
  backward_mode = 0,
  backward_speed = -1,
  duration = 0,
  forward_mode = 0,
  forward_speed = -1,
  name = 'Magnolia Boulevard',
  road_classification = {
    may_be_ignored = true,
    road_priority_class = 31
  }
}

So the logic is a bit different in each profile. That's probably not ideal, but the good news is that we're not routing cars over highway=construction.

@1ec5
Copy link
Member

1ec5 commented Jul 7, 2017

There’s also an older way to tag roads under construction (example):

highway=cycleway
construction=yes

or even in the planning stages:

highway=motorway
proposed=yes

Like most renderers and routers these days, OSRM ignores the construction=yes and proposed=yes tags. I guess that’s fine as long as we retag any existing uses: osmlab/to-fix#215.

Many of these tags were added several years ago, so it’s entirely possible that OSRM gets lucky and the construction=yes ways have long finished construction. On the other hand, proposed ways are always a big question mark: some mappers zealously draw out planned road corridors as proposed roads, even though the plans aren’t precise enough to map as roads by that stage.

@emiltin
Copy link
Contributor

emiltin commented Jul 7, 2017

just to clarify, the bike profile does not route on way with unknown highway tag values, unless access tags are set. the output above shows the mode is set to 0, which makes it unroutable.

we should add 'construction' in the list of things to avoid for cars. and why not improve update the handler to avoid ways tagged the old scheme construction=yes or proposed=yes

@1ec5
Copy link
Member

1ec5 commented Jul 7, 2017

we should add 'construction' in the list of things to avoid for cars. and why not improve update the handler to avoid ways tagged the old scheme construction=yes or proposed=yes

That’s reasonable. At the same time, any occurrence of the old tagging scheme is likely to be outdated and should be double-checked for accuracy.

@emiltin
Copy link
Contributor

emiltin commented Jul 7, 2017

right. it's possible it's better to just ignore the old tags

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