Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only index features strictly within tile boundaries #6429

Merged
merged 1 commit into from
Apr 3, 2018

Conversation

ansis
Copy link
Contributor

@ansis ansis commented Mar 30, 2018

Instead of indexing all features for querying, index only those that are actually within the tile boundaries. This prevents duplicate results from being returned for point features. This is only a partial fix for the duplicate results problem (lines and polygons can still return
duplicate results).

Previously we relied on tile buffers for cross-tile indexing. But now that we have #6036 we don't need that anymore.

I noticed this while porting #6036 to -native. These test changes would be useful to have for that port.

Launch Checklist

  • briefly describe the changes in this PR
  • write tests for all new functionality
  • [N/A] document any changes to public APIs
  • post benchmark scores
  • manually test the debug page

Instead of indexing all features for querying, index only those that are
actually within the tile boundaries. This prevents duplicate results
from being returned for point features. This is only a partial fix for
the duplicate results problem (lines and polygons can still return
duplicate results).
@ansis ansis requested a review from ChrisLoer March 30, 2018 20:13
Copy link
Contributor

@ChrisLoer ChrisLoer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

The part of the logic I tried to scrutinize the most is how this interacts with symbol features, which aren't covered by the changes in #6036. My reading is that we'll still be in the same situation described in #6298: we may miss querying some tiles altogether, but if we query a tile for symbols, it won't be affected by this change because symbol queries don't touch the non-symbol grid.

@ansis
Copy link
Contributor Author

ansis commented Apr 3, 2018

My reading is that we'll still be in the same situation described in #6298: we may miss querying some tiles altogether, but if we query a tile for symbols, it won't be affected by this change because symbol queries don't touch the non-symbol grid.

Yep, this is how I understand it as well.

@ansis ansis merged commit 866ab7b into master Apr 3, 2018
@ansis ansis deleted the index-within-tile-boundaries branch April 3, 2018 16:26
anandthakker pushed a commit to mapbox/mapbox-gl-native that referenced this pull request Apr 5, 2018
anandthakker added a commit to mapbox/mapbox-gl-native that referenced this pull request Apr 9, 2018
* Fix style parsing bug for constant expressions

Closes #10849

* Ignore tests for unported GL JS change

Refs mapbox/mapbox-gl-js#6429

* Fuller fix

* Update mapbox-gl-js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants