Skip to content
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

Features not packaging through qfieldsync to qfield from offline editing layer #542

Open
AnomalousExploration opened this issue Oct 1, 2023 · 18 comments

Comments

@AnomalousExploration
Copy link

Hello and thank-you for your work!

I have a layer in qgis that has approx. 40 feature points already. When I go to configure current project in qfieldsync, I set the layer to offline editing in cable export. I package for qfield, put files from export folder into imported project folder and open up the project which works perfectly. When I go to my layer and look at the features list, it says the layer has no features:

image

image

This didn't use to happen and has been happening on and off for me since I started using qfield quite heavily in May 2023. Currently, I work around it be duplicating the layer in qgis and configuring the copied layer to be 'copy' in cable export.

Another issue I have been having consistently, but havn't noticed since the latest version came out, is an issue with importing from qfieldsync cable.:

If I add new features to a layer in qfield, the features show as normal on my map. I add features to multiple layers. I then copy the data from the 'imported project - project folder' into my computer qgis import folder. Then I synchronize the data to my qgis project. If I add more than 15 features to a layer, the features sometime do not add to that layer in qgis after syncing. This problem is far more frustrating and I do not have a solid work around other than adding the data from the import folder and using the processing toolbox: 'Merge data from vector layer' and then 'delete duplicates by attributes'.

Thank-you for your help!

@m-kuhn
Copy link
Member

m-kuhn commented Oct 2, 2023

Can you try to use the QGIS offline editing plugin on this layer and see if the offline package produced this way does have features?

@m-kuhn m-kuhn added the feedback label Oct 2, 2023
@AnomalousExploration
Copy link
Author

Hi Mattias,

Thanks for getting back to me! I'm a bit confused by your comment. Is the offline editing plugin connected to qfield? From my reading here, https://docs.qgis.org/3.28/en/docs/user_manual/plugins/core_plugins/plugins_offline_editing.html, it looks to me like it does not use qfield synce. I may need a bit more help in figuring how to test this. If there isn't a video or blog post, I'm happy to look into your consulting options at ch.gis. Thanks!

@m-kuhn m-kuhn removed the feedback label Oct 3, 2023
@m-kuhn
Copy link
Member

m-kuhn commented Oct 3, 2023

Hi there,

Yes, it's this plugin. The code behind QFieldSync is using the same functionality in the background than this plugin. I don't think there is anything existing.
Please send me a mail to check for consulting possibilities.

@AnomalousExploration
Copy link
Author

AnomalousExploration commented Dec 13, 2023 via email

@m-kuhn
Copy link
Member

m-kuhn commented Jan 30, 2024

Hi @AnomalousExploration, December and January were busy months, sorry for the late reply.

The easiest way is to book a jump start package, see https://www.opengis.ch/qfield-training/

@AnomalousExploration
Copy link
Author

Hey,

Some more information about the issue. I've continued to hvae problems with it on multiple computers through multiple people. The BlueJay_Data geopackage shows that the layers do have features attached in the gpgk but they are not showing on the phone in the qfield project, same as before.

image

image

The data geopackage shows no features but I expect it shouldn't.

image

Is it potentially a problem with the qgs. file? Why isn't QField reading the BlueJay_Data geopackage?

@AnomalousExploration
Copy link
Author

I should also mention that this loss of funciton happens sporadically, where features are not added to the qfield project after packaging and/or not adding to the qgis project after synchronizing. This makes qfieldsync extremly unreliable for data collection and I think it is a very pressing issue!!

@SeqLaz
Copy link
Member

SeqLaz commented Feb 28, 2024

Hello @AnomalousExploration you have two options if you want to work offline: you can either have a separate GeoPackage for each layer, or you can use the Copy action.

@AnomalousExploration
Copy link
Author

Hi @SeqLaz ,

To confirm. Does qfieldsync not support multiple vector files for editing if they are in the same geopackage?

It works sometimes. Is it a glitch in the system?

The copy action does not work for synchronizing data to the project.

Thanks!

@SeqLaz
Copy link
Member

SeqLaz commented Feb 29, 2024

Can you try export the layers as separate GeoPackage (.gpkg) files?

@SeqLaz SeqLaz added feedback and removed feedback labels Feb 29, 2024
@AnomalousExploration
Copy link
Author

I'm giving that a go now. I'm also curious if it could be an issue with the geometry type I'm choosing. For point data, when adding a new talbe I have been choosing Geometry Type 'Point'.
image

Should I now be choosing 'Multipoint' because there is multiple points collected. The issue with this solution is my current system continues to work for an unset amount of time before crashing.
image

@VxTedxV
Copy link

VxTedxV commented Mar 7, 2024

point : 1 feature = 1 point
multipoint : 1 feature = several points

@SeqLaz
Copy link
Member

SeqLaz commented Mar 8, 2024

Due to the distinction between Points and MultiPoints on the screenshot before, it is advisable to opt for a Point

@AnomalousExploration
Copy link
Author

Thank-you @VxTedxV and @SeqLaz!

I've had a chance to test @SeqLaz suggestions above: 'Can you try export the layers as separate GeoPackage (.gpkg) files?'

Unfortunately, I did not have succcess. Here's what happened. I made four editable geopackage files with one layer per gpkg. I used QFieldSync to export to phone. I collected around 15 - 20 points per layer and imported with qfieldsync back to phone. All collected data from the editable layers imported back fine.

I then edited the layer on QGIS and added a further 3 point features to the Points1 geopackage ( circled in blue):

image

Then I used qfieldsync and the cable to export back to the phone and only the three points I added on QGIS were shown on QField. All other features were not transferred. This is essentially the same problem so saving one layer per geopackage does not work as a solution.

@SeqLaz
Copy link
Member

SeqLaz commented Mar 9, 2024

@AnomalousExploration The recent updates in QField allow you to work directly from a copy of the folder containing the project and its layers. This eliminates the need to package the project through QFieldSync, as long as the project doesn't contain PostGIS layers. To test this workflow, follow these steps:

  1. Copy the folder containing the project from your computer to the mobile device (be sure that QGIS is closed and all layers are in the same folder), or by importing the project using your favorite cloud provider (ex. Google Drive or Dropbox).

QField Documentation

  1. Digitize some data in QField on the mobile device.
  2. Copy the project folder back to your computer after making changes. However, please ensure to create a backup of the project before rewriting the folder.

By following these steps, you should be able to seamlessly work with your project between your computer and mobile device without any complications.

@SeqLaz SeqLaz removed the feedback label Mar 9, 2024
@AnomalousExploration
Copy link
Author

Hi SeqLaz,

this seems efficient if only adding data from one device to a qgis project. With multiple devices, I do not think this will be a smooth workflow. The synchronization option has worked great in the past. I'm hoping to get back to that.

Attached is the details for another layer that did not sync the data collected on the phone back to the qgis project through the synchronizatoin qfieldsync option:

image

image

image

Thoughts? Thanks!

Ellen

@suricactus
Copy link
Collaborator

Attached is the details for another layer that did not sync the data collected on the phone back to the qgis project through the synchronizatoin qfieldsync option:

image

Hi @AnomalousExploration , I see that the "Extent" for you says it is "Null". I suspect this might cause your issue. Can you check if the other layers that do work show other than "Extent: Null"?

@AnomalousExploration
Copy link
Author

Thank-you @suricactus . I've checked the layers and that is associated with data in the vector file. The current file contains no features at the moment, similar to how all of our editable layers start, but I don't have that problem currently with the others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants