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

Editing PostGIS Layer Fails #5345

Closed
rettenda opened this issue Jun 17, 2024 · 3 comments · Fixed by #5348
Closed

Editing PostGIS Layer Fails #5345

rettenda opened this issue Jun 17, 2024 · 3 comments · Fixed by #5348

Comments

@rettenda
Copy link

Describe the issue

We have created a few QField projects last year. The main datasource is a PostGIS database that we access directly. Just after the setup, everything worked just fine. But now we tried to replicate the project and had some issues when directly updating the geometries with a GNSS reciever.
The database contains 2d point features, and when creating new points everything works flawlessly. But as soon as we try to edit the geometries of existing points, saving fails with the message "ERROR: Geometry has Z dimension but column does not". As it worked last year, and the behaviour is not the same when creating and editing features, I assume this is a bug introduced in a recent version.

Reproduction steps

Steps to reproduce the behavior:

  1. Connect to GNSS reciever via UDP NMEA stream
  2. Create a new point in a PostGIS backed layer
  3. Try to edit an existing point using the position from GNSS

Expected behavior

Z value of point gets dropped, just like when creating the point

Observed behavior

Saving the changes fails with error "ERROR: Geometry has Z dimension but column does not" in the log protocol.

Screenshots and GIFs

Screenshot_20240617-162513_

Desktop

  • OS: Windows 10
  • QGIS Version 3.28.11
  • QFieldSync Version 4.9.1

Mobile

  • Device: Happy Tab 8
  • OS: Android 10 (Build HAPPY-TAB-8_V1.00)
  • QField version: v3.3.1 (Build 6b9cda)

Additional information

  • Problem started happening recently, didn't happen in an older version of QField: Yes
  • Problem can be reliably reproduced, doesn't happen randomly: Yes
  • Problem happens with all files and projects, not only some files or projects: Yes
@nirvn
Copy link
Member

nirvn commented Jun 17, 2024

@rettenda , what do you do exactly to "update the geometry"? Which geometry editor tool are you using?

@rettenda
Copy link
Author

@nirvn , unfortunately out tablet is in use with a colleague at the moment, so i'm not capable of creating screenshots. I try to describe the process, but if it's unclear I could create the screenshots later..

Steps for creating points:

  • Select desired layer in side panel
  • Lock the crosshair to the current position
  • Create the feature with the green plus sign in the lower right
  • Add attributes and save
    → All works as expected

Steps for updating the points:

  • Selecting the point in the map view
  • Editing geometry with the button in the header of the attribute box (Line icon with pencil)
  • Making sure crosshair is still locked to the recievers position
  • Confirming the editing with the button in the lower right
    → Error message appears and geometry is not changed

@nirvn
Copy link
Member

nirvn commented Jun 18, 2024

@rettenda , thanks, these extra details were what was needed to identify the issue and fix it.

Please give the APKs in this PR a try to confirm editing is working: #5348

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