mojodna / marblecutter-virtual

Virtual catalogs for marblecutter
Other
48 stars 30 forks source link

Same file doesn't work on non-s3 host #17

Open olivierdalang opened 4 years ago

olivierdalang commented 4 years ago

Hi !

Everything works as expected with files is hosted on amazon s3 (testing out with files from openaerialmaps). Now, when I download the whole file, and serve it from another host, and get the following error in the console (I get a 404 in the browser) :

rasterio.errors.RasterioIOError: '/vsicurl/https://[...].tif' not recognized as a supported file format.

I inspected the responses using curl, and couldn't find a significant difference, neither in the response headers nor in the data. In particular, the other server also seems to correctly support byte ranges.

Is there some S3 specific logic ? Or are (as said in the readme) all type of http hosts supported ? Any idea of what could be wrong, or how to debug this ?

Thanks !!

mojodna commented 4 years ago

As Sean suggested on the rasterio list, try running in debug mode.

If I had to guess (I'm going to ;-), I'd say that the problem is that your HTTP host doesn't support Range requests, which are necessary for partial reads of remote images.