Skip to content

GPS Lookup #17

Closed
Closed

Description

@karussell

At the moment the lookup of node ids via gps coordinates has the limitation that it would require lots of memory for world wide coverage as it is a quadtree of depth one (simple array), or if less memory is used for the index the precision is suboptimal.

Different requirements makes the new Location2NodesNtree a challenge:

  1. should be precise and robust, i.e. should fetch exact matches as well as not so close nodes
  2. should work for edges close to the query point, not only for nodes => use bresenham
  3. should be fast to create
  4. should work world wide => depth of the quadtree has to be bigger than 1
  5. very memory efficient, e.g. do not store lat,lon instead use a graph-traversal as post-processing step to get the lat,lon for distance comparison. And remove nodes from an quadtree entry if the nodes' network (within the borders) is already represented from a different node. And the quadtree depth shouldn't be that big
  6. querying should be fast => quadtree traversal and post processing should be fast
  7. should work on Android and can be loaded from disc => store into a DataAccess (but one could use an in-memory quadtree with normal Java-references to construct such an on-disc index)
  8. support to accept only edges/nodes for a specific vehicle
  9. support LevelGraph -> do not index shortcuts + while searching do not include shortcuts for distance check - only for traversal. Also avoid problems if high-level nodes are disconnect from its lower-level nodes!

Activity

  1. karussell commented on Apr 2, 2013

    @karussell
    MemberAuthor

    All points should be implemented in Location2NodesNtree now, except point 8 (vehicle filter) which follow soon. On Android we need to improve query performance.

    Drawback of this index: off-road queries are more likely to fail as we do not yet use the same flood fill algorithm (to fill empty tiles) as in Location2IDQuadtree. Avoiding flood filling saves space and speeds up indexing. We could improve this by a partial flood filling.

  2. karussell commented on May 10, 2013

    @karussell
    MemberAuthor

    off-road queries are more likely to fail

    Now this is configurable via osmreader.locationIndexHighResolution=500 where the number is the distance (in meter) for approximation search. To e.g. improve query time on Android lower this to 200

  3. karussell commented on May 17, 2013

    @karussell
    MemberAuthor

    Since this commit 8151aa0 we're now respecting the vehicle when searching for a close id, which fixes the only left problem (point 8)

  4. added a commit that references this issue on Jun 23, 2020
  5. added a commit that references this issue on Jul 10, 2020
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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions