mapbox / mapbox/mapnik-omnivore
minzoom is too high
- Dominant language
- JavaScript
- Stars
- 44
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to understand the minzoom calculation logic at https://github.com/mapbox/mapnik-omnivore/blob/805d115acece01aa1977a0f4ba303bb7977bacf2/lib/utils.js#L6.
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](http://www.abs.gov.au/ausstats/subscriber.nsf/log?openagent&1270055001_ste_2011_aust_shape.zip&1270.0.55.001&Data%20Cubes&1D26EC44E6ABD911CA257801000D8779&0&July%202011&23.12.2010&Latest), if that link doesn't work, it's the [last file here](http://www.abs.gov.au/AUSSTATS/abs@.nsf/DetailsPage/1270.0.55.001July%202011?OpenDocument)
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.
Contributor guide
Research direction
Start with the minzoom calculation in lib/utils.js at line 6, then compare its result for the referenced SHP and GEOJSON data. Use the sample file and the tile-live-copy result as reproduction points; done means the same data receives an appropriate low minzoom without depending on file compression differences.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100