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

COG validation fails for files that are SPARSE and have sparse edge tiles in the overviews. #281

Closed
mpadillaruiz opened this issue Jan 29, 2024 · 4 comments

Comments

@mpadillaruiz
Copy link

I am using the rio-cogeo validator to validate a sparse COG file and the validation returns False even though it is a valid COG. Other COG validators return valid for the same file.

I believe this is because the overviews are stored as sparse and the validator checks for the first tile offset of each overview (BLOCK_OFFSET_0_0 tag). Since there are sparse edge tiles, this value it is zero, and it cannot verify that the overviews are in the right order, even though they are.

Is this a limitation of the validator? Is there a way to overcome this issue or is it planned to be fixed?

Thank you.

@vincentsarago
Copy link
Member

👍 Yes I think we should fix this!
Do you have an example of file you could create or share? 🙏

@mpadillaruiz
Copy link
Author

Hi @vincentsarago
Here is a link to the file I have been testing with
https://drive.google.com/file/d/1urWkrF0qY-JZ54souDdj5gljsL5CLivZ/view?usp=sharing

I get the following error with the validator:

COG Validation info
    - The offset of the first block of overview of index 1 should be after the one of the overview of index 2 (error)

Note that the overviews and full image are in the right order if you ignore the sparse zero blocks:
fullimage
overview1
overview2
overview3
overview4

mpadillaruiz pushed a commit to mpadillaruiz/rio-cogeo that referenced this issue Feb 2, 2024
…PARSE and have sparse edge tiles in the overviews
@mpadillaruiz
Copy link
Author

Hi @vincentsarago ,
I opened a PR for this fix. I was not able to add reviewers but please let me know if there is some other procedure I need to follow.

Thank you!

vincentsarago added a commit that referenced this issue Feb 9, 2024
Fix for issue #281 COG validation fails for sparse edge tiles
@vincentsarago
Copy link
Member

this was done in #282

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

No branches or pull requests

2 participants