mapbox / mapnik-vector-tile

Mapnik implemention of Mapbox Vector Tile specification
BSD 3-Clause "New" or "Revised" License
553 stars 117 forks source link

Raster Overzooming Fix #240

Closed flippmoke closed 7 years ago

flippmoke commented 7 years ago

This is a fix for #239.

/cc @springmeyer for review

codecov-io commented 7 years ago

Codecov Report

Merging #240 into master will increase coverage by 0.21%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #240      +/-   ##
==========================================
+ Coverage   63.86%   64.08%   +0.21%     
==========================================
  Files          30       30              
  Lines        2228     2230       +2     
==========================================
+ Hits         1423     1429       +6     
+ Misses        805      801       -4
Impacted Files Coverage Δ
src/vector_tile_featureset_pbf.ipp 88.62% <100%> (+2.56%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b9ab1f3...60e8c99. Read the comment docs.

springmeyer commented 7 years ago

@flippmoke - did you consider returning no image (which would end up leaving a transparent map since no data would be rendered)? Is the idea behind returning a 1 px image to try to keep a somewhat consistent color no matter the level of overzooming?

flippmoke commented 7 years ago

@springmeyer yes, basically you are just getting into smaller and smaller portions of the same pixel at some point, this basically prevents the values from converging until they reach zero. You will always want to still sample that same pixel.