Closed pigreco closed 4 years ago
Works fine in master.
@saberraz
even in the master it doesn't work!
How are you adding the file? As this:
(the attribute table in this method is not correct for me, but the geometry appears correct): Or download the vrt and add it from browser panel as a file?
@saberraz
thanks for your tests, but I can't even use a new profile.
thanks anyway :-(
@saberraz
maybe it works on linux but not on win ??
Doesn't work on Windows for me.
On ubuntu 18.04 and Qgis 3.10 it works!
On ubuntu 18.04 and Qgis 3.10 it works!
QGIS 3.10 on Ubuntu 18.04 still uses GDAL 2.4 while on Windows is on GDAL 3, this maybe the cause of the difference you are seeing.
I tried on QGIS 2.18 with gdal 2.x in windows and it also failed.
I wonder if this is something to do with the way OS handles HTTPS certificate.
I think it's a bug, please remove Feedback tag, thanks
I think it's a bug, please remove Feedback tag, thanks
@pigreco we are not done testing, be patient.
Translating the vrt with ogr2ogr works as expected, so all the infos seems to point at some bug in QGIS on Windows OR something Windows related. I can't test on macOS at the moment (I will as soon as possible).
@pigreco on macOS it work...(QGIS 3.12)
Translating the vrt with ogr2ogr works as expected, so all the infos seems to point at some bug in QGIS on Windows OR something Windows related. I can't test on macOS at the moment (I will as soon as possible).
The problem is, the source gets updated and if you translate it, you need to run a cron job to keep the translated version in sync with the source :)
The problem is, the source gets updated and if you translate it, you need to run a cron job to keep the translated version in sync with the source :)
yes I know, but that was not my point. What I wanted to test was if OGR had problems reading the data.
Works on: Ubuntu 18.04.4 LTS Release: 18.04 Codename: bionic Versione di QGIS : 3.12.0-București Compilato con Qt: 5.9.5 | Esecuzione con Qt : 5.9.5 Compilato con GDAL/OGR: 2.2.3 | Esecuzione con GDAL/OGR : 2.2.3
Also for me it does not work: I have QGIS 3.10.2-A Coruña and GDAL 3.0.3, in Windows.
Running the ogr command from OSGEO shell I have no problem
Please, if you need to make a fundraiser say it explicitly. thanks
Please, if you need to make a fundraiser say it explicitly. thanks
@pigreco there is no "you" here, just "we". If there is a bugs that annoys you particularly and is not getting attention/traction from the project than you should consider fixing it one way or another. For example the QGIS Portugal user group organized a small crowd funding a few weeks ago and supported fixing an annoying bug (for us, at least): https://github.com/qgis/QGIS/issues/35465
@gioman I think @pigreco was offering to fund a fix?
I know it doesn't help but it works fine for me on current master/linux built with GDAL 3.
I just did a test with the same file attached on the master OSGeo4W64 win 10 QGIS Does not work!
I know it doesn't help but it works fine for me on current master/linux built with GDAL 3.
yeah it seems to be a Windows only issue...
I can have a look, if just debugging and building on :windo wasn't so time consuming... :unamused:
And, surprise! I cannot reproduce on windows/current master:
Different GDAL / PROJ versions?
Different GDAL / PROJ versions?
Yeah, possibly.
Ok, I've spent the last 8 hours rebuilding QGIS on windows with latest GDAL and PROJ, well, my CPU did that, I feel guilty for all the wasted energy because it works :confused: :
@elpaso
Thanks for the various tests, but in my machine it doesn't work even on clean QGIS profile :-(
Hi @elpaso you have compiled and therefore I assume it is a different thing from using my same version. Please, if you can, use the same version as me. thank you
Hi @elpaso you have compiled and therefore I assume it is a different thing from using my same version. Please, if you can, use the same version as me. thank you
I could but I don't see the point: if I can reproduce it within a debugger I can try to fix it but by running a release build I cannot do nothing anyway.
rebuilding QGIS on windows
@elpaso where I can find clear instructions on how to compile on Windows?
@elpaso
I could but I don't see the point: if I can reproduce it within a debugger I can try to fix it but by running a release build I cannot do nothing anyway.
If useful, I can make my laptop available for remote testing
I did some tests with the VRT layer file codid19-regioni_dw.vrt at https://github.com/pigreco/COVID-19_ITA/blob/master/risorse/codid19-regioni_dw.vrt using the following QGIS versions:
Excuse my reflection, but the problem is not to be found in GDAL or PROJ but in windows, as shown by the various tests.
regards
Yes, the different GDAL/PROJ (mostly GDAL) version or a local issue were initial hypotheses. Testing various combination of QGIS/GDAL version on both Windows and Linux on different systems was a way of trying to rule out those hypotheses: in fact, it seems now very unlikely, since all the combination of QGIS/GDAL on Windows fail and all those on Linux succeed.
rebuilding QGIS on windows
@elpaso where I can find clear instructions on how to compile on Windows?
I don't know if they qualify for clear
and YMMV but here they are https://github.com/qgis/QGIS/blob/master/INSTALL.md#4-building-on-windows
Note that it took me several years and an endless combination of black magic, sorcery, blood & tears, payers & blasphemies to have a kind-of-working windows toolchain. As a friend, I strongly advise you to go that route and I'm wondering what will you gain from it anyway, unless you plain to do some debugging (that does not even work well).
@elpaso
I could but I don't see the point: if I can reproduce it within a debugger I can try to fix it but by running a release build I cannot do nothing anyway.
If useful, I can make my laptop available for remote testing
@pigreco just to be clear, I absolutely trust you and all the other users that are experiencing the issue and that the issue does exist, I'm sorry I cannot do anything about it because I cannot even reproduce it on my machine, and that is the prerequisite for me to even try to debug it.
@pigreco out of curiosity, did you try if the MXE builds are also affected from this issue? They use slightly different versions of the libraries.
Note that it took me several years and an endless combination of black magic, sorcery, blood & tears, payers & blasphemies to have a kind-of-working windows toolchain. As a friend, I strongly advise you to go that route and I'm wondering what will you gain from it anyway, unless you plain to do some debugging (that does not even work well).
@elpaso I read this 5 minutes ago and still laughing! :)
Hi @elpaso, great suggestion! Latest qgis-dev 3.15.0-64 (8d2a0d1ebb) fails to correctly load the VRT layer,
while the latest MXE at the same commit (8d2a0d1ebb) succeeds!
@agiudiceandrea unfortunately that doesn't help much, MXE is using old GDAL and PROJ.
@elapso, If it fails on Windows with an OSGeo4W QGIS version, while it works with an MXE QGIS version and with Ubuntu and Mac versions, the issue could be related to OSGeo4W.
In fact, I found the culprit!
In OSGeo4W the environmental variable VSI_CACHE (GDAL related) is set to TRUE. In the MXE build this env var is no set (so the default FALSE is assumed by GDAL). Setting VSI_CACHE to TRUE before launching on the MXE QGIS build lead to the same issue and the VRT layer is not displayed. Removing the VSI_CACHE setting (or setting it to FALSE) from the OSGeo4W launching procedure, the issue is not present and the VRT layer is correctly displayed.
@pigreco, @stev-0, could you please check if the following procedure fixes the issue for you?
In QGIS, go to Settings->Options->System, in the "Environment" box check "Use custom variables", then add a new row with Overwrite
in the "Apply" column, VSI_CACHE
in the "Variable" column and FALSE
in the "Value" column.
Restart QGIS and try to add the VRT layer.
@agiudiceandrea @elpaso bingo
@agiudiceandrea congratulations! We have a very good team of investigators here :smiley:
The investigation is not over... :-)
It seems the VSI_CACHE=TRUE
custom setting in OSGeo4W (along with VSI_CACHE_SIZE=1000000
) was introduced 7 years ago https://github.com/qgis/QGIS/commit/9222f152b30948a3a9d9f66dffd162548022f7fd by @blazek to workaround a reported performance issue about shapefile reading over network on Windows. See https://github.com/qgis/QGIS/issues/15688 (https://issues.qgis.org/issues/6448) and this thread on gdal-dev ml.
Is it still required, since GDAL/OGR may have been improved in the meantime?
Anyway, looking at the HTTPS traffic sniffed during the QGIS attempt to retrieve the data from the server, it seems also that the GDAL/OGR VSI cache functionality does not work well with the way the data is provided by the server at download.data.world, while it works well for data stored on other servers (e.g. githubusercontent.com) even with VSI_CACHE set to TRUE.
I will try to ask to the gdal-dev ml for clarification.
The handle of data hosted on data.world server if VSI_CACHE=TRUE was fixed upstream in GDAL/OGR. See https://github.com/OSGeo/gdal/pull/3007.
So I think this issue report could be closed now.
@agiudiceandrea @elpaso grazie mille!
I have this Virtual File Format by GDAL/OGR
codid19-regioni_dw.vrt
(source : https://data.world/ondata/covid-19-italia-dati-dipartimento-protezione-civile/workspace/file?filename=dpc-covid19-ita-regioni.csv)
it is read well by OGR
but not by QGIS!!
step:
codid19-regioni_dw.vrt
OSGeo4W64 Win10