Hi Samuel,
Thanks for your email!
I eventually solved my original problem by using a different approach: I converted my VRT mosaics into standalone COG files and uploaded them to shared_datasets. This works well in our operational QField projects.
One important detail: if you’re sharing your project with other users, make sure they also have access to the shared_datasets project (at least as Readers). Sharing the main project alone is not sufficient.
After receiving your message, I decided to investigate the VRT issue again and ran several tests.
I created a VRT referencing nine COG files, uploaded all the files to shared_datasets, and added the VRT as a layer in a separate QGIS project.
Here is what I found:
-
The VRT works correctly in QGIS Desktop when all nine COGs are available locally.
-
QFieldCloud correctly recognizes the VRT as a shared dataset.
-
A COG added directly as a layer in the QGIS project is correctly downloaded and displayed in QField, on both Android and iOS.
-
However, the VRT mosaic is not displayed.
-
I also tried placing all the COGs in the same directory as the VRT, using relative paths, but this did not solve the problem.
During some of my tests, QFieldCloud also reported an invalid_dataprovider error when trying to open the VRT during project packaging.
My findings therefore seem consistent with your hypothesis: QFieldCloud appears to recognize the files explicitly referenced by the QGIS project, but not the additional COG files referenced internally by the VRT. As a result, those files may not be downloaded to the device.
I also looked into how QFieldSync handles shared datasets. In the QGIS project file, shared raster layers are referenced using the localized: prefix, but this mechanism does not appear to extend to the internal references within a VRT. I couldn’t find a way to make QFieldCloud recognize those dependencies automatically.
So, unfortunately, I haven’t found a working solution using VRTs either.
For now, my workaround is to use standalone COG mosaics instead. This avoids the dependency issue and works reliably with shared_datasets.
If you find a solution, I’d be very interested to hear about it!
Best regards,
Elena