GeoHealthCheck icon indicating copy to clipboard operation
GeoHealthCheck copied to clipboard

Test for COG range requests

Open pvgenuchten opened this issue 3 years ago • 2 comments

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.

pvgenuchten avatar Feb 16 '22 21:02 pvgenuchten

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 avatar Feb 25 '22 11:02 justb4

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

justb4 avatar Feb 25 '22 12:02 justb4