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

API for deleting tiff tags #246

Open
danlamanna opened this issue Mar 22, 2024 · 1 comment
Open

API for deleting tiff tags #246

danlamanna opened this issue Mar 22, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@danlamanna
Copy link

Hey, thanks for the package :)

I have some large cloud optimized geotiffs and I'm trying to remove specific tags from them. I was looking through the code and saw the __delitem__ implementation, but it appears to only delete them from the in-memory tag registry. Is there a way to delete tags from a file on disk? Or should I rewrite the file omitting the tags I want to remove, and if so, is there a recommended way of doing so?

Thanks!

@cgohlke cgohlke added the enhancement New feature or request label Mar 22, 2024
@cgohlke
Copy link
Owner

cgohlke commented Mar 22, 2024

There is currently no API for deleting tags, just changing tag types and values. It should be easy to add in principle, but would leave many class instances out of sync with the state of the file...

Tifffile cannot write COGs with pyramid levels.

The tiffset tool from the libtiff library apparently supports unsetting tags.

Or try tifftools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants