mapbox / cardboard

tile indexed geo database interface.
ISC License
52 stars 10 forks source link

Calculate an ideal min/max zoom #142

Closed rclark closed 9 years ago

rclark commented 9 years ago

Can we add min/max zoom data to the metadata record associated with each dataset? Can this be safely updated incrementally within the metadata.addFeature, .updateFeature, .deleteFeature methods?

An example of the heuristic that we generally use to calculate the zoom range is here: https://github.com/mapbox/tilelive-cardboard/blob/0e1675e69fceed4e8e654951e5b1019cc8d198e3/index.js#L110-L133

cc @jakepruitt

rclark commented 9 years ago

Actually just had a slightly better thought, which is that this heuristic could be applied at read-time from the getDatasetInfo side.