Bug report #12885
cannot add part to empty geometries anymore
Status: | Closed | ||
---|---|---|---|
Priority: | Severe/Regression | ||
Assignee: | Nyall Dawson | ||
Category: | Digitising | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 20975 |
Description
we used to be able to use "add part" map tool to set the geometies of features having NULL geometries.
this doesn't work anymore.
Related issues
History
#1 Updated by Marco Hugentobler over 9 years ago
- Assignee set to Marco Hugentobler
#2 Updated by Giovanni Manghi over 9 years ago
- Target version set to Future Release - High Priority
- Affected QGIS version changed from 2.8.2 to master
#3 Updated by Marco Hugentobler over 9 years ago
This should work with current master branch. Could you check?
#4 Updated by Matthias Kuhn over 9 years ago
- Status changed from Open to Closed
- Resolution set to fixed/implemented
Works for me,
thank you!
#5 Updated by Tudor Bărăscu over 9 years ago
- Status changed from Closed to Reopened
Hi,
Just tested this and the tool doesn't work anymore (at least for point geometries).
At first I thought I used the add ring tool but unfortunately I did the correct steps.
Tested with 2.10 -- Debian 8 and Windows.
Tested with master build under Debian 8.
The problem doesn't exist in the the latest 2.8 build.
Error:
PostGIS error while changing geometry values: ERROR: Geometry type (MultiPoint) does not match column type (Point).
I only have Point geometries in that table.
Thanks,
Tudor
#6 Updated by Denis Rouzaud about 9 years ago
#7 Updated by Nyall Dawson about 9 years ago
- Assignee changed from Marco Hugentobler to Nyall Dawson
#8 Updated by Nyall Dawson about 9 years ago
- Status changed from Reopened to Closed
Fixed in changeset ad10b5264e45e4d298c5a256618d6bbb96a84944.
#9 Updated by Tudor Bărăscu about 9 years ago
- Status changed from Closed to Reopened
I still get
Geometry type (MultiPoint) does not match column type (Point)
I understand that a solution would be to have the geometry as Multipart but for a case (https://github.com/qwat/qwat-data-model/issues/27) where I'm using a layer with valves (two point geometries, one to describe the valve position on the pipe and the other on top of the handle - ground level) MultiPoint doesn't seem right.
#10 Updated by Nyall Dawson about 9 years ago
- Status changed from Reopened to Feedback
Can you please post (asap) a sample dataset and steps to reproduce this? I can't confirm in master...
#11 Updated by Tudor Bărăscu about 9 years ago
Of course: https://www.dropbox.com/s/mlex6kjaj2prfby/add_part_bug.zip?dl=0
As in this sample data set the data is in sqlite format, the error thrown now is:
Could not commit changes to layer valve_handle Errors: ERROR: 1 geometries not changed. Provider errors: SQLite error: valve.geom_handle violates Geometry constraint [geom-type or SRID not allowed] SQL: UPDATE "valve" SET "geom_handle"=GeomFromWKB(?, 3844) WHERE ROWID = ?
Steps to recreate the bug
-------------------------
By opening the project you will see too QGIS layers that are pointing to the same valve table, but at different geometry columns (geom and geom_handle) both of type Point.
I created a feature in the valve (geom) layer, and I want to add a valve handle location (geom_handle).
In order to do this:
- select the valve_handle layer (based on geom_handle), open the attribute table and select the wanted feature (it's the only one in this case) then use the add part tool to create a point geometry in the geom_handle column.
The tool creates the geometry as it should but trying to save outputs the above error.
This workflow worked until QGIS 2.10, and is present on current Master.
Thanks Nyall for looking into it,
All the best
#12 Updated by Matthias Kuhn about 9 years ago
Nyall, you can ping me if you have troubles. I can reproduce it locally.
#13 Updated by Nyall Dawson about 9 years ago
- Status changed from Feedback to Closed
Fixed in changeset 8286b1fe39b11be7e92b08532be91b2f68cc0ef6.
#14 Updated by Tudor Bărăscu about 9 years ago
It works like a charm!
Thanks Nyall