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

Add an option to exclude tiles that are entirely covered by a polygon #808

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

e-n-f
Copy link
Contributor

@e-n-f e-n-f commented Oct 24, 2019

No description provided.

@jingsam
Copy link
Contributor

jingsam commented Oct 24, 2019

How to render this excluded tiles which are entirely covered by a polygon? using mapbox-gl's overzoom feature?

I think it would be better to create a images table that store blob and hashes, then create a tiles view to reference. On these way, many duplicated tiles can be omitted.

@e-n-f
Copy link
Contributor Author

e-n-f commented Oct 24, 2019

The particular ticket that this was in response to intended to fill the holes by overzooming. The table of hashed blobs may be a better way to do it though.

@andrewharvey
Copy link
Contributor

andrewharvey commented Oct 25, 2019

So I tested out this branch and it did work in reducing a tileset of around 30M tiles (which is the maximum tile count Mapbox will accept uploads) to around 21M tiles.

Still testing to see if there are any downsides or side affects when submitting tilesets to Mapbox with missing ocean or land tiles.

@e-n-f
Copy link
Contributor Author

e-n-f commented Oct 25, 2019

It might be more effective to only drop tiles in sets of 4, to be clearer that all 4 should inherit from the same parent tile, but I am not sure whether this is actually effective in rendering.

@jingsam
Copy link
Contributor

jingsam commented Oct 27, 2019

clients may experice too may 404 errors. What if map initial zoom is 8, but parent tile only exsist in zoom 7. so these tiles would be never be loaded.

@andrewharvey
Copy link
Contributor

What if map initial zoom is 8, but parent tile only exsist in zoom 7. so these tiles would be never be loaded.

I'm pretty sure that GL JS will trace up the tile pyramid until it gets a tile response. So it might take a bit longer to load since there are more requests but it should eventually get a tile and overzoom it.

The other option is too break the MBTiles into different regions upload each to Mapbox then ask for the composited tiles, which also has a performance cost for having to composite, given this is only an issue a high zooms in the middle of nothing, I think it's preferable than asking Mapbox servers to composite every tile request.

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.

3 participants