-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[gdal] Don't try to download whole COG locally in order to determine open options #51982
Conversation
Can I grab your thoughts @rouault ? |
That's always a bit tricky. That will work with COGs or other raster that are served by a HTTP range friendly server, but that will fail for unfriendly servers where only the ingest-the-whole-file strategy would work. But as noted the later is only practical for smallish files. |
Hmm.... so the other option I thought of was that we just entirely skip the creation option population for http urls. Do you think that's a better solution? |
open options you mean ? That would be reasonable too, at least for the GeoTIFF driver they are quite esoteric for QGIS use cases. But would the /vsicurl/ prefix be added when adding the file ? |
Ahh, I misunderstood your original concern -- it was with always adding the prefix, right? So I propose:
|
yes, but actually trying (my previous comments were done without trying) with a relatively small file of 2 MB, adding without /vsicurl/ is barely usable
sounds good. |
This can be very slow to process, as it may involve a complete download of a huge remote file (hanging QGIS in the process)
Raster Layer dialog, prompt the user to promote these to vsicurl URIs via a user-friendly warning message
1d67378
to
97de4d0
Compare
@rouault |
Great ! |
Don't try to download whole COG locally in order to determine open options in Add Raster Layer dialog, if a "http" URL is entered without the /vsicurl/ prefix
If a user directly enters a HTTP URL into the "Raster datasets" option in the Data Source Manager, QGIS will otherwise hang while the whole remote file is retrieved.
Instead automatically update the entered URI to a proper /vsicurl/ one so that GDAL's optimisations for remote data sources can take effect.