Bug report #15197
Error when saving edited layer from Spatialite database
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Data Provider/SpatiaLite | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | OS X | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | not reproducable |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 23136 |
Description
I use master version QGIS 2.15 6000ff4f and there is very serious error during editing vector layers from Spatialite database. It's impossible to save changes in layers. There is error like that:
Nie można zatwierdzić zmian dla warstwy mala architektura i oznaczenia v6
Błędy: BŁĄD: nie dodano 1 obiektu.
Błędy źródła danych:
Błąd SQLite: tymczas.Geometry violates Geometry constraint [geom-type or SRID not allowed]
SQL: INSERT INTO "mala architektura i oznaczenia v6"("geometry","rodzaj") VALUES (ST_Multi(GeomFromWKB(?, 2180)),?)
Sorry that this is in Polish. Which is strange error occurs only sometimes, without any noticeable patterns or cause, at least for me. Which is strange in the same time I can save edited layer as SHP or CSV without any problem. I can also import this SHP to database without any errors. But it is very time consuming.
History
#1 Updated by R. R. over 8 years ago
- File 15197.mp4 added
Hi Michal, this sounds like you are trying to save an invalid geometry (see screencast).
#2 Updated by Michal Jurewicz over 8 years ago
I can't open your file. Please upload it one more time.
#3 Updated by R. R. over 8 years ago
Just create a new SpatiaLite table (Geometry: LineString) and add crossing line features. Next, select the features and merge them. Saving the layer edits fails with a similar error like posted above.
#4 Updated by Matthias Kuhn over 8 years ago
- Status changed from Open to Feedback
Hi Michal,
please also check the output of
SELECT * FROM geometry_columns WHERE f_table_name LIKE 'mala architektura i oznaczenia v6';
#5 Updated by Michal Jurewicz over 8 years ago
OK, I understand. However, In my case I just add new point feature to points layer (with standard tool from QGIS). Nothing more, and this error suddenly occurs.
#6 Updated by Michal Jurewicz over 8 years ago
Here is screencast with corrupted layer: http://quick.as/56Alh1mYe
I tried to add new point and save, without success. After deleting added points I saved with success.
#7 Updated by Giovanni Manghi over 8 years ago
- Category set to Data Provider/SpatiaLite
- Priority changed from High to Normal
- Crashes QGIS or corrupts data changed from Yes to No
Could you please attach sample data? Thanks!
ps
it seems to me there is no data corruption, the original data is not lost or changed in any form, the issue is just about saving new data.
#8 Updated by Giovanni Manghi almost 8 years ago
Reinhard Reiterer wrote:
Just create a new SpatiaLite table (Geometry: LineString) and add crossing line features. Next, select the features and merge them. Saving the layer edits fails with a similar error like posted above.
if the layer is declared as "lines" (and not "multilines") then is normal that trying create a multigeometry will fail.
#9 Updated by Giovanni Manghi almost 8 years ago
- Resolution set to not reproducable
- Status changed from Feedback to Closed
Giovanni Manghi wrote:
Could you please attach sample data? Thanks!
cannot replicate with data of my own on 2.18.2. Please reopen if necessary.