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

Add support for implicit maxspeed values #1152

Closed
3 tasks done
nikita03565 opened this issue Mar 27, 2024 · 0 comments
Closed
3 tasks done

Add support for implicit maxspeed values #1152

nikita03565 opened this issue Mar 27, 2024 · 0 comments

Comments

@nikita03565
Copy link
Contributor

nikita03565 commented Mar 27, 2024

Contributing guidelines

  • I understand the contributing guidelines

Documentation

  • My proposal is not addressed by the documentation or examples

Existing issues

  • Nothing similar appears in an existing issue

What problem does your feature proposal solve?

There are several hundreds of thousands edges with implicit maxspeed value like "RO:urban". It'd be helpful to convert those string values to numbers in order to get the most accurate maxspeeds as well as travel times.

What is your proposed solution?

Scrape maxspeed mapping from wiki, put the mapping somewhere in config so users could override values as they see fit, like with other config values: ox.settings.implicit_maxspeed_values["AR:rural"]=200 for example.
In _clean_maxspeed function try to safely get value from the mapping if parsing as number failed.

What alternatives have you considered?

Don't put whole mapping in config, accept new parameter with this mapping in add_edge_speeds so users provide it themselves, but I think that keeping it with all default values in settings would result in a better out of the box experience for users.

Additional context

Taginfo link for maxspeed values.
Related PR #1153

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

No branches or pull requests

1 participant