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

minzoom is too high #142

Open
andrewharvey opened this issue Jul 1, 2016 · 1 comment
Open

minzoom is too high #142

andrewharvey opened this issue Jul 1, 2016 · 1 comment

Comments

@andrewharvey
Copy link

andrewharvey commented Jul 1, 2016

I'm trying to understand the minzoom calculation logic at

module.exports.zoomsBySize = function(filepath, extent, callback) {
.

It uses the original file size to number of tiles ratio to find the minzoom. Is this the best heuristic, since formats which compress worse (geojson vs shp) will have a higher minzoom for the exact same data.

Secondly the automated minzoom I'm seeing is too high. Here is a sample file to demonstrate, if that link doesn't work, it's the last file here

As a SHP file the minzoom is set as 5, the exact same data as a GEOJSON file the minzoom is set as 6.

In practice, that sample file needs to show up at least at minzoom 3 but ideally all the way out to minzoom 0.

I ran tile-live-copy with minzoom=1 and the tile created for zoom 1 is only 1.4KB so it's not that huge is it?

EDIT: I assume this code is what's being used when I upload a new Tileset in Mapbox Studio, as that's where I'm running into this issue.

@rclark
Copy link
Contributor

rclark commented Jul 26, 2016

Is this the best heuristic, since formats which compress worse (geojson vs shp) will have a higher minzoom for the exact same data.

Also, datasets with varying density have issues (see #140). This is definitely not the best heuristic, but it is also incredibly efficient compared to other algorithms that we've tried out -- like trying to get a sense of vertex density or rendering tiles optimistically until you hit a threshold. Definitely open to other ideas for other ways to assess this though!

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

No branches or pull requests

2 participants