Currently mapnik-omnivore decides on a raster's maxzoom with breaks at tile resolutions. If the raster resolution is at all above this break, it "tiles up" to a higher maxzoom, effectively resulting in upsampled imagery at the maxzoom. This is problematic for raster datasets that are "snapped" to mercator tile resolutions, as rounding errors in pixel size can result in effectively a 1 zoom jump.
This would remove these rounding errors, and limit resampling to at most half the difference between mercator zooms.
Integrating this as weighted snapping (as I've been working on incolonel-mercator) would allow for flexibility in maxzoom selection. This is where any number between 0 (snap up) and 1 (snap down) is used to express where the threshold should be (here is 0.333):
Currently mapnik-omnivore decides on a raster's
maxzoom
with breaks at tile resolutions. If the raster resolution is at all above this break, it "tiles up" to a higher maxzoom, effectively resulting in upsampled imagery at themaxzoom
. This is problematic for raster datasets that are "snapped" to mercator tile resolutions, as rounding errors in pixel size can result in effectively a 1 zoom jump.Here's how it works now (just higher zooms):
Proposal
Instead of always rounding to the next higher zoom, set breaks in-between mercator tile resolution and round to the closest zoom:
This would remove these rounding errors, and limit resampling to at most half the difference between mercator zooms.
Integrating this as weighted snapping (as I've been working on in
colonel-mercator
) would allow for flexibility inmaxzoom
selection. This is where any number between 0 (snap up) and 1 (snap down) is used to express where the threshold should be (here is 0.333):@GretaCB @yhahn @perrygeo