qfieldsync icon indicating copy to clipboard operation
qfieldsync copied to clipboard

Features not packaging through qfieldsync to qfield from offline editing layer

Open AnomalousExploration opened this issue 2 years ago • 18 comments

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!

AnomalousExploration avatar Oct 01 '23 19:10 AnomalousExploration

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 avatar Oct 02 '23 09:10 m-kuhn

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!

AnomalousExploration avatar Oct 03 '23 03:10 AnomalousExploration

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.

m-kuhn avatar Oct 03 '23 12:10 m-kuhn

Hello Matthias,

I hope you are doing well. I am currently looking for an expert that may have time to run through our current QGIS systems and help us move to QFieldCloud. After using the software for a couple years, I've learned a great deal but am still hitting lots of hurdles along the way, especially with python and more elaborate tasks, and am hoping to also have an expert that we can call on when things need to be solved timely and I can't figure them out.

I don't know if you or someone in your circle would be interested in that type of consulting position but I'm hoping to find someone for a couple hours of support here and there that might be a good fit moving forward.

Thank-you for your consideration!

Warm Regards,

Ellen Hunter-Perkins, B.Sc. CEO and Co-Founder +1 778 922 2040 (she/her)

Anomalous Exploration

Grassroots Geological Services with a Lighter Footprint

www.anomalous.rocks

On Tue, Oct 3, 2023 at 5:56 AM Matthias Kuhn @.***> wrote:

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.

— Reply to this email directly, view it on GitHub https://github.com/opengisch/qfieldsync/issues/542#issuecomment-1744921632, or unsubscribe https://github.com/notifications/unsubscribe-auth/A46QRRVLMBSUWID5JPQKMOTX5QDRLAVCNFSM6AAAAAA5OQ4UHGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBUHEZDCNRTGI . You are receiving this because you authored the thread.Message ID: @.***>

AnomalousExploration avatar Dec 13 '23 22:12 AnomalousExploration

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/

m-kuhn avatar Jan 30 '24 14:01 m-kuhn

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 avatar Feb 26 '24 04:02 AnomalousExploration

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!!

AnomalousExploration avatar Feb 26 '24 04:02 AnomalousExploration

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.

SeqLaz avatar Feb 28 '24 20:02 SeqLaz

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!

AnomalousExploration avatar Feb 29 '24 01:02 AnomalousExploration

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

SeqLaz avatar Feb 29 '24 06:02 SeqLaz

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

AnomalousExploration avatar Mar 07 '24 18:03 AnomalousExploration

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

VxTedxV avatar Mar 07 '24 23:03 VxTedxV

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

SeqLaz avatar Mar 08 '24 06:03 SeqLaz

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.

AnomalousExploration avatar Mar 08 '24 17:03 AnomalousExploration

@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 avatar Mar 09 '24 11:03 SeqLaz

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

AnomalousExploration avatar May 31 '24 19:05 AnomalousExploration

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"?

suricactus avatar Jun 03 '24 08:06 suricactus

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.

AnomalousExploration avatar Jun 03 '24 23:06 AnomalousExploration