You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
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....
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.
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).
Activity
Reverse Geocoding: Samples example #727
Reverse Geocoding: update changelog #727
ludwigb commentedon Nov 28, 2015
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).
devemux86 commentedon Nov 28, 2015
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?
ludwigb commentedon Nov 28, 2015
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
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):
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....
devemux86 commentedon Nov 30, 2015
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.
Reverse Geocoding: use size in touch for POIs retrieval #727
devemux86 commentedon Nov 30, 2015
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).
devemux86 commentedon Dec 1, 2015
I created #741 for enhancements in
MapDataStoreregarding data retrieval.devemux86 commentedon Dec 3, 2015
@ludwigb do you see any issues in updated implementation?
ludwigb commentedon Dec 5, 2015
That should work, thanks
devemux86 commentedon Dec 5, 2015
I'm closing this as a working proof of concept.
Future enhancements can be in separate issues.
Reverse Geocoding: improved data retrieval #727
devemux86 commentedon Jan 7, 2016
I improved the Reverse Geocoding data retrieval, based on the enhanced MapDataStore #741.
Reverse Geocoding improvements #727 (#992)