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

Test for COG range requests #421

Open
pvgenuchten opened this issue Feb 16, 2022 · 2 comments
Open

Test for COG range requests #421

pvgenuchten opened this issue Feb 16, 2022 · 2 comments

Comments

@pvgenuchten
Copy link

Is your feature request related to a problem? Please describe.
We recently published some COGs, but failed to validate if the range requests were supported. In the end the problem was caused by the firewall which didn't allow range request headers.

Describe the solution you'd like
Ability to run a series of range requests on a COG (cloud optimised geotiff). First request would fecth the index of the COG, then some requests to fetch some random data and see if a valid image stream is returned.

@justb4
Copy link
Member

justb4 commented Feb 25, 2022

For this case a custom Probe needs to be developed. There are several existing examples like wmsdrilldown.py, esrifs.py etc. They follow a similar pattern: get the metadata, use the MD to construct requests, add to Result object. The most important is to override perform_request(self). It should fill self.result. You are totally free as for how this is implemented.

@justb4
Copy link
Member

justb4 commented Feb 25, 2022

This implementation may help: https://github.com/rouault/cog_validator/blob/master/cog_validator.py .
From what I have seen, accessing COG requires GDAL and/or rasterio. At the moment GDAL is not a dependency within GHC. Adding GDAL makes installations more complex...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants