Open Hannes-Ole opened 2 years ago
Has there been a resolution or workaround for this? I have data that I can't get from qfield because of this issue.
I don't know of a resolution. My workaround is not using the QField export for projects where I want to keep my folder structure (or where I have datasets with the same name). Since QGIS projects are fully supported in QField, I now switched to simply copying the complete project folder with .qgz instead of using the QField export feature. Obviously this has the drawback of not making use of choosing a subset of layers/data, but it works for me and it forgoes the abovementioned problem.
In your case, I am unsure why you wouldn't be able to get data from QField? Because it doesn't sync to the right layer? Have you tried doing a manual join / merge?
Hope that helps. Best regards!
Describe the issue
When packaging a project that contains multiple layers with the datasources that use the same filename (within different directories), these datasets are overwritten in the qfield folder and only the last one file is kept (that is then the basis for all respective layers). E.g. I have a QGIS project containing Layer A (data source: ./project_version1/standmap.shp) Layer B (data source ./project_version2/standmap.shp)
When packaging for QField, all datasources are only copied to a single directory, where standmap.shp (A) is then overwritten by standmap.shp (B). As a result, a map that would usually show two different datasources now only shows one (see screenshot below). Layer A (data source: ./standmap.shp) Layer B (data source ./standmap.shp)
In my use case, a lot of identically named datasets are automatically generated in subfolders. Manual renaming is a workaround, but very tedious.
Reproduction steps
Steps to reproduce the behavior:
Expected behavior
Ideally, QField handles datasources with the same name by sorting them in subfolders or renaming them (e.g. standmap_1.shp, standmap_2.shp, ...). This is an option a lot of file browsers natively offer (do you want to overwrite or rename?) At least, the user should see a warning, that datasources with the same file name are present and only one of these files will be present as datasource for the QField project.
Observed behavior
Datasources with the same name are silently overwritten until the last one is kept as the only datasource that all respective layers use.
Screenshots and GIFs
Desktop
Reproducible on various systems/versions:
Additional information