qfieldcloud
qfieldcloud copied to clipboard
"Geometry type is not compatible with the current layer." when having PointZ Objects in layer
Dear QField-Cloud Team,
I have unexpected Problems in a QfieldCloud Project synchronizing data to QField. When I take a look at the Jobs log i see:
ERROR: 216 feature(s) not added - geometry type is not compatible with the current layer.
But I cannot explain this to me. The Project has been using for about 8 months now without any Problems. The Problem is reproducible in a selfhosted environment and on qfield.cloud. The JobID is 444237b0-d257-4a7e-80dc-0104cd18672a
I think the Problem is related to the data. What is confusing me is, that in QGIS everything is working fine. Further if i go to the Toolbox and run "Vector geometry" -> "Check validity" everything seems to be fine in QGIS so i think the Problem is related to QFieldCloud.
I also tried it to upload to QFieldCloud with different versions of QGIS (3.32.1-Lima, 3.30.3-'s-Hertogenbosch).
When i search for the Error in the code i found this. So it might be QGIS related in QFieldCloud, but i don't understand why it is working on local QGIS.
Currently i have no clue how th debug further and find and solve the Problem.. :disappointed:
Feel free to have a look to the Project I uploaded to QFieldCloud.
Thanks for your help!
OK, after deleting the last changes i found the following:
The error is caused by the Objects wich fid in (203, 204, 206). I inspected the SQLite gpkg and found out, that this Objects have a geometry, that is 37 Bytes large - all others have a 29 Byte large geometry.
The Working start with: 47 50 00 01 27 12 00 00 01 01 00 00 00
and the not working with: 47 50 00 01 27 12 00 00 01 e9 03 00 00
. Currently i don't know enoughe about the encodings.
I will investigate further, but also would appreciate help.
I found the problem and a workaround.
The problem was, that the not working objects had a PointZ geometry. QFieldCloud seems only to work with Point geometries. As a workaround, I converted the objects geometry.
But i still think this is a issue that should be solved. In my mind are some proposals:
- Fix QFieldCloud to work with PointZ geometries
Or:
- Improve Error Messages that the fid and the wrong geometry type is included
- Think about either let the complete synchronization fail, that it doesn't just show success and no points are included anymore
- Think about synchronizing the other points and show a warning that not all are synchronized, that users doesn't get confused.
Could this be related to https://github.com/opengisch/qfieldcloud/issues/738?
Did anything happen on this issue? I think it is still relevant and annoying. At least, a good error message might be helpful.. :)
Just ran into the same problem - Out of ~50project layers, 4 end up empty (with 0 features) in Qfield although the packaging job says it was successfull.