Hello all,
I've tried to add to an existing spatialite layer some features from another 
layer.
The existing layer is a simple shapefile: I selected the features I wanted to 
copy and pasted to the spatialite layer. Everything was working file until I 
tried to save the changes. The following error appears:

Could not commit changes to layer Plan_gen

Errors: ERROR: 903 feature(s) not added.
Provider errors:
SQLite error: Plan_gen.Geometry violates Geometry constraint [geom-type or SRID 
not allowed]
SQL: INSERT INTO "Plan_gen"("PKUID","Geometry","Layer","area") VALUES 
(NULL,GeomFromWKB(?, 32634),?,?)


it states it might be a problem of geometry type or a SRID problem. All layers 
are in the same CRS (EPSG:32634), and all features, in both layers, are of type 
polyline.

Is it a spatialite bug? a qgis bug? or Am I missing anything?

I've had this issue with other data before. The solution I adopted to work 
around this was:
1) save the spatialite layer as shapefile
2) paste data into the newly created shapefile
3) delete the spatialite table
4) load in the spatialite DB the shapefile

This works, but it is too tricky for everyday use. I tried to convert all my 
shapefiles to spatialite, but the limitation spatilite still have in data 
structure manipulation (adding/removing/renaming fields, etc, a sqlite limit in 
fact) and now in content editing make me think that that was not a good idea. I 
can not switch this archives to postGIS yet, because of the actual work-flow 
organization of the project.

Any help or advice will be appreciated!


-----
Julian Bogdani
jbogd...@gmail.com
http://bradypus.net





_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to