Skip to content

Make location lookup faster #232

Closed
Closed

Description

@karussell

The location index currently feeds a grid with node numbers. For edges the bresenham algorithm is used to e.g. also fill cells where the edge only passes by but has no node.

Then while querying a cell its nodes is uses to get the closed node or edge. But all neighboring cells have to be grabbed as well to avoid missing cells or one-off errors which can happen in the bresenham algorithm. There are perfect line rasterization algorithms possible but they are a bit more complicated (to get the edge cases right) and also they'll add more nodes to the grid which will make the index size large (from some tests around 60% larger). In contrast the speed-up seems to be in only 25% on average. This is a bit strange as we only need to grab 1 cell instead of 9 but maybe on average the node collection is not much different when taking the neighbors into account.

Activity

  1. karussell commented on Jul 11, 2014

    @karussell
    MemberAuthor

    Closing for now, as the current dynamic behaviour, implemented via #221 is good enough. Reopen if one really needs high performance location lookup which could be the case e.g. for map matching or similar stuff where one has to lookup thousands of coordinates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions