geopython / GeoHealthCheck

Service Status and QoS Checker for OGC Web Services
https://geohealthcheck.org
MIT License
83 stars 71 forks source link

Test for COG range requests #421

Open pvgenuchten opened 2 years ago

pvgenuchten commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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