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

"Geometry type is not compatible with the current layer." when having PointZ Objects in layer #774

Open
stcz opened this issue Aug 20, 2023 · 5 comments

Comments

@stcz
Copy link
Contributor

stcz commented Aug 20, 2023

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.. 😞

Feel free to have a look to the Project I uploaded to QFieldCloud.

Thanks for your help!

@stcz
Copy link
Contributor Author

stcz commented Aug 20, 2023

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.

@stcz
Copy link
Contributor Author

stcz commented Aug 20, 2023

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.

@stcz stcz changed the title Geometry type is not compatible with the current layer. "Geometry type is not compatible with the current layer." when having PointZ Objects in layer Aug 20, 2023
@BoswachterMarc
Copy link

Could this be related to #738?

@stcz
Copy link
Contributor Author

stcz commented Dec 28, 2023

Did anything happen on this issue? I think it is still relevant and annoying. At least, a good error message might be helpful.. :)

@meyerlor
Copy link

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.

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

3 participants