cogeotiff / rio-cogeo

Cloud Optimized GeoTIFF creation and validation plugin for rasterio
https://cogeotiff.github.io/rio-cogeo/
BSD 3-Clause "New" or "Revised" License
308 stars 42 forks source link

Add decimation base as input to cog_translate #285

Closed mccarthyryanc closed 5 months ago

mccarthyryanc commented 5 months ago

Similar to the decimation_base added to morecantile. I'd like the ability to define a custom decimation_base when creating COG overviews. This PR adds that var in along with some tests. For now, it requires an input for overview_level, since that defaults to the value returned by rasterio.rio.overview.get_maximum_overview_level which uses a hardcoded base of 2.

vincentsarago commented 5 months ago

@mccarthyryanc thanks for the PR 🙏

Would you be able to update the documentation for this new option 🙏

mccarthyryanc commented 5 months ago

@vincentsarago , I've updated the docs. Since the docs mostly refer to the CLI (at least in the Advanced Topics section) I also added this option, rio cogeo --decimation-base. Hopefully that is okay.