Skip to content

Reverse Geocoding #727

Closed
Closed

Description

@devemux86

Reverse Geocoding at map touch point, reading the map data for the area and returning:

  • POI(s) in specified touch radius
  • Way(s) containing touch point

Activity

  1. added this to the 0.6.1 milestone on Nov 27, 2015
  2. ludwigb commented on Nov 28, 2015

    @ludwigb
    Collaborator

    Surprisingly easy implementation with good results. A very welcome starting point. +1

    Where it does not work however, is at tile boundaries: at the moment only the tile data for the tile into which the touch point falls is retrieved, so any points or buildings just across a tile boundary on another tile will not be retrieved.

    My suggestion would be to add another method onto the MapDatastore that retrieves data for a given geographic extend. Implementing this for the MapFile accurately is not trivial (I tried once, but at one point I simply could not understand the selection mechanism used when the data comes from different base tiles in the MapFile format.). Having this interface would also allow it to be used in a much more simplified version of the LabelLayer (no more caching, cache-management, but at the cost of multiple reads).

  3. devemux86 commented on Nov 28, 2015

    @devemux86
    CollaboratorAuthor

    There are certainly rough edges. Since we played with single tile read, overlapping symbols / polygons at boundaries can be a mismatch.

    I like the idea of arbitrary area retrieval, will check it.
    Rectangle extend or other shape?

  4. ludwigb commented on Nov 28, 2015

    @ludwigb
    Collaborator

    My view would be only to extract rectangles (not any more complicated shapes, they could be implemented in user code as subsets of a envelope).

    With the current MapFile format in mind, I think the best way is to have two operations

    • read(BoundingBox bbox)
    • read(Set tiles) where the set of tiles is a contiguous set of tiles that covers a rectangular area

    In general these would be two very different operations but for the MapFile format the first one must essentially be implemented through the second. With the internal structure of the MapFile there would be two different cases (which makes it tricky):

    • all tiles fall onto a single base tile (meaning actually the operation on the MapFile we currently have already reads all the right data, it just filters most tiles out)
    • the tiles span multiple base tiles: in this case multiple requests must be made and combined.
    • I vaguely remember that there was a third case, ???

    Returning too much data is known to cause memory problems.....

    The read(Set) operation could then be used in the LabelLayer to get all the labels for the tiles visible on screen....

  5. devemux86 commented on Nov 30, 2015

    @devemux86
    CollaboratorAuthor

    If my tests are correct then we need to fix only the symbols overlapping two tiles.
    Closed ways like buildings seem to work fine at both sides of tile boundaries.

    BTW I added a grid layer in example for debug.

  6. devemux86 commented on Nov 30, 2015

    @devemux86
    CollaboratorAuthor

    Before altering any API I pushed a simple change for POIs retrieval.
    Essentially question all tiles under touch, based on assumption that symbols have size.
    i.e. long press tile boundaries will ask both tiles for data (filtering POIs in the process).

  7. devemux86 commented on Dec 1, 2015

    @devemux86
    CollaboratorAuthor

    I created #741 for enhancements in MapDataStore regarding data retrieval.

  8. devemux86 commented on Dec 3, 2015

    @devemux86
    CollaboratorAuthor

    @ludwigb do you see any issues in updated implementation?

  9. ludwigb commented on Dec 5, 2015

    @ludwigb
    Collaborator

    That should work, thanks

  10. devemux86 commented on Dec 5, 2015

    @devemux86
    CollaboratorAuthor

    I'm closing this as a working proof of concept.
    Future enhancements can be in separate issues.

  11. devemux86 commented on Jan 7, 2016

    @devemux86
    CollaboratorAuthor

    I improved the Reverse Geocoding data retrieval, based on the enhanced MapDataStore #741.

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