Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add decimation base as input to cog_translate #285

Merged
merged 2 commits into from
Apr 2, 2024

Conversation

mccarthyryanc
Copy link

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
Copy link
Member

@mccarthyryanc thanks for the PR 🙏

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

@mccarthyryanc
Copy link
Author

@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.

```

This is primarily useful when working with [custom TileMatrixSets](https://developmentseed.org/morecantile/usage/#define-custom-grid) that also use a non-default decimation base.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😍

@vincentsarago vincentsarago self-requested a review April 2, 2024 11:32
@vincentsarago vincentsarago merged commit 3ed39b6 into cogeotiff:main Apr 2, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants