Skip to content

Car: Different max speed for inner and outer city #230

Open

Description

@karussell

Currenty max speed relies on the maxspeed tag in the city or village and often streets do not have such a tag. We need to grab the boundaries of the city and take this into account.

This issue is related to #75 and #175

Possible improvements afterwards:

  • Route through Prague should be 20 minutes not 16
  • Laval, France should be 20 not 15 minutes and using one of the northern motorways not the southern (as first suggestion)
  • Mettmann Germany should avoid the inner city and slightly slower (not 8min but more like 10min)
  • Bayreuth, Germany should use the nordring (as first suggestion) and avoid the inner city, also not 5min but more like 10
  • Paris oh, not through Paris! And not 33min but more like 40-45min (at least)
  • London Time is 20 but should be more like 40min (but here going through the city is similar slow ;))
  • London should be more like 10-15 minutes not 6
  • why is the time difference so big here? (9min vs. 6min)

(These numbers and 'real routes' are from mostly customers&user reports and own experiences)

Activity

  1. added this to the 0.5 milestone on Aug 18, 2014
  2. modified the milestones: 0.4, 0.5 on Nov 6, 2014
  3. jansoe commented on Feb 18, 2015

    @jansoe
    Contributor

    I currently work on this, but I guess city boundaries are not an aedequate solution.
    One might could use traffic_sign = city_limit, but it seems that this tag is frequently not set.
    For this reason I propose right now, to use the landuse tag and take residential and commercial areas as areas with reduced speed limit.

  4. jansoe commented on Feb 19, 2015

    @jansoe
    Contributor

    Thanx Raphael for your input.
    My approach is very similar, but to speed up computation I will assign speed limits not exactly on point but within a pixel raster. Do you have an estimate how well landuse boundarys correspond to city_limit areas?

  5. NopMap commented on Feb 19, 2015

    @NopMap
    Contributor

    Some comments on this:
    It would be good to develop a general solution. Assigning a speed value within city boundaries is only one application. Other (currently unresolved) use cases are:

    • marking all ways inside an area as unaccessible, e.g. in a military restricted area
    • applying rules to all ways inside a natural reserve area
    • applying legal restrictions to all ways inside woods (there are such laws in some German states)

    Putting this into a preprocessing step feels like a good idea to me. So it does not weigh down the regular import and may be executed on a different machine. I assume the memory requirements are stiff. Are your solutions based on a database?

    A spontaneous idea for optimization is merging the various polygons into a single area first, then matching the ways against the smaller number of merged areas.

    bye, Nop

  6. karussell commented on Feb 19, 2015

    @karussell
    MemberAuthor

    Other use cases could be "prefer ways for bikes in a forest" etc

    But as it is tricky on its own making it generic from the start is overkill. As always: step by step :)

    I assume the memory requirements are stiff

    For worldwide we expect roughly 10% more RAM.

    A spontaneous idea for optimization is merging the various polygons into a single area first

    A similar approach will be used (a 'simple' grid assigning boolean values)

    Are your solutions based on a database?

    No. GraphHopper will not depend on an external thing to administrate. An internal java based database might be used for the import though. See #220

  7. jansoe commented on Feb 19, 2015

    @jansoe
    Contributor

    It would be good to develop a general solution

    it's right now a simple solution, but with future generalization in mind. I hope it's ready beginning of next week for evaluation. Computation time seems to be allright, and only in the order of the current import process.

  8. removed this from the 0.4 milestone on Feb 23, 2015
  9. jansoe commented on Mar 23, 2015

    @jansoe
    Contributor

    Currenty max speed relies on the maxspeed tag in the city or village and often streets do not have such a tag

    My investigations suggest, that it is not missing maxspeed tags which cause counter intuitive routes, but rather the assumption that both small and larger roads with the same maxspeed also result in the same average speed, neglecting prioritised traffic flow on larger roads.
    Therefore in this branch I apply the following heuristic to estimate average travel velocity: the travel speed of ways within defined areas (e.g. residential, commercial, retail) is reduced by different factors on primary, secondary, tertiary roads.

    In my opininon this leads to more intuitive roads

    old:
    oldspeed
    new:
    newspeed

    old:
    oldspeedouter
    new:
    newspeedouter

  10. karussell commented on Mar 23, 2015

    @karussell
    MemberAuthor

    You mean that these improvements are possible without the difference of inner and outer city?

  11. jansoe commented on Mar 23, 2015

    @jansoe
    Contributor

    No, I mean it is not sufficient to adjust values where the maxspeed tag is missing, but also to adjust maxspeed values "within" a city by a factor depending on the highway level

  12. karussell commented on Mar 23, 2015

    @karussell
    MemberAuthor

    Thanks for clarification & nice! I'll play with it tomorrow!

  13. jansoe commented on Mar 23, 2015

    @jansoe
    Contributor

    All in all this increases travel time by about 10%.
    In my opinion this still does not reflect true travel times, but in a second step one might take turn cost and traffic lights into consideration.
    (see #334, #75)

    I think an optimal solution would take real world travel times into account and would adjust the heuristic to reflect them. But for this one would need an extensive dataset of such travel data. Anyone aware of this?

  14. jansoe commented on Apr 20, 2015

    @jansoe
    Contributor

    This branch now only assigns speed values to streets within citys where the maxspeed tag is missing. But this has only a minor effect on traveltimes. Also, the approach to use landuse = residential | industrial | retail to detect city regions, seems to be a bit problematic, because there are citys (e.g. madrid) where large areas are not tagged. (Although for germany it seems OK).

    In general this code allows to apply region specific speed limits. So one might could reuse this code to implement country specific speed limits (#175) or for other cases.

  15. ratrun commented on Aug 15, 2015

    @ratrun
    Contributor

    @jansoe: Your above referenced branch tree/CitySpeedMerge returns a now "404 Not found". I wanted to take a look on what you did in this branch. Could you provide this work again?

  16. karussell commented on Aug 22, 2015

    @karussell
    MemberAuthor

    @ratrun @jansoe the branch would be helpful for me too :)

  17. jansoe commented on Sep 2, 2015

    @jansoe
    Contributor

    @ratrun @karussell
    sorry for the delayed reaction time, but now the branch is again online. don't hesitate to ask questions, if anything seems unclear

  18. dteirney commented on Mar 31, 2022

    @dteirney

    @karussell apologies for nudging an old issue. Is there some guidance or direction (perhaps elsewhere) that you could share for options to help with routing and the associated duration calculations within urban centers? We're finding that we get a lot of routes traversing through urban centers with lots of traffic lights where it's very unlikely that the maxspeed on those ways will be accurate for an average speed approximation when compared to the maxspeed for nearby motorway routing options.

  19. karussell commented on Mar 31, 2022

    @karussell
    MemberAuthor

    See also the recent discussion in #2395. This should be a foundation to improve the ETAs and avoiding city centers.

  20. added a commit that references this issue on Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions