Skip to content

Conversation

@jongiddy
Copy link
Contributor

OSM maps for UK occassionally use integers for speed limits in MPH. Also, some roads have textual limits like "national". To handle these properly, it is useful to be able to simply modify the code that interprets the OSM maxspeed tags. For presentation purposes it can also be useful to allow represention of the speed limit in the database in MPH.

To simplify modification of the map ingest to support such modifications, this patch separates the interpretation of the speed limit string into a separate function extract_speed_limit.

In addition, the patch:

  • supports speed limits with no space between the number and "mph"
  • replaces the hard-wired path in one test with a generated path
  • adds an __init__.py file to allow testing to be run using python -m unittest discover from the tools directory
  • cleans up some minor PEP8 style issues

The patch does not actually support the UK-specific cleanups or use of MPH. Those changes need to be added separately (and other national variations may exist).

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

Successfully merging this pull request may close these issues.

1 participant