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

Zerebubuth/add overlaps bbox filter #1116

Merged
merged 3 commits into from
Nov 2, 2016

Conversation

zerebubuth
Copy link
Member

A couple of text fixes:

  1. Different example for barrier=city_wall, as the previous example was edited and didn't match the rule any more.
  2. Dropped example of "... (historic)" hospital, which had been edited to not be a hospital any more.

Updated boundary query to use new "overlaps" test rather than intersection. This should prevent it matching in the interior of large polygons and speed up those queries.

Requires tilezen/tilequeue#118.

@rmarianski could you review, please?

@zerebubuth zerebubuth merged commit cd216db into master Nov 2, 2016
@zerebubuth zerebubuth deleted the zerebubuth/add-overlaps-bbox-filter branch November 2, 2016 16:09
zerebubuth added a commit to tilezen/tilequeue that referenced this pull request Nov 2, 2018
For boundary geometries, we want to include the row in the result of a query when some part of its boundary is inside the bounding box. Originally, we used `st_intersects` for this, but it had the problem that it would include rows which had very large (and complex) boundaries for tiles which were completely in the interior of the polygon, which led to unnecessary data being returned and processed.

In tilezen/vector-datasource#1116, a new `bbox_overlaps` test was added, using `st_overlaps`. This no longer included polygons for which the tile bounding box was entirely with the interior. However, it also didn't include polygons which were themselves entirely within the interior of the bounding box, which meant some small countries (e.g: Liechtenstein) went missing at some zoom levels!

This patch changes the definition of the `bbox_overlaps` test to also include polygons contained by the tile bounding box.
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