Skip to content

Unify bulk customization of graph properties like speed and access #1280

Closed

Description

@karussell

See my comment here, ie. we have three approaches:

  • spatial rules: requires to build an index up front and is best used via iterating through all edges. So usage will be mostly on import time
  • change graph API: currently does not support polygons and should be used for rather small areas only like for a construction or longer traffic jam we removed this with Remove /change graph endpoint #1931
  • block_area can be used per-request but has bugs like block_area does not work if start and/or end are on the same edge #1127 is now considered a legacy API
  • the CustomWeighting approach allows changing the max_speed, priority and speed_factor for certain areas. Is used per-request and for import.

They fulfill different use cases: on import and temporary per API request. (There was a third: permanent per API-request but this was removed in #1931).

And so the approaches are different: 1. build an index before looping through all edges, 2. loop through a geographically limited set of edges to collect the edge IDs or 3. consider the changed properties only while doing the Dijkstra (geometry.contains at runtime)

Activity

  1. changed the title [-]Unify builk customization of graph properties like speed and access[/-] [+]Unify bulk customization of graph properties like speed and access[/+] on Feb 3, 2018
  2. boldtrn commented on Feb 13, 2018

    @boldtrn
    Member

    How do you propose to unify the code?

    Change graph and block area both use the GraphEdgeIdFinder. So the core logic seems to be the same. Maybe these two could become more similar by passing an encoded json into the block area?

    The spatial rules have to exist before the edge is created, therefore it cannot use the GraphEdgeIdFinder. I am not sure how we could merge the logic? It might be possible to create a "ChangeGraphSpatialRuleIndex". Then we wouldn't have to update the edges anymore, but could check the properties in the Weighting. Therefore changes would be faster, but routing would be slower.

  3. karussell commented on Mar 27, 2023

    @karussell
    MemberAuthor

    Mostly done. Requires probably further clarification regarding spatial rules but this would be a different issue.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions