-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Saving as SpatiaLite fails with "save as" dialog when input is a multi geometry #18990
Comments
Author Name: Giovanni Manghi (@gioman) this one? http://docs.qgis.org/2.2/pdf/en/QGIS-2.2-QGISTrainingManual-en.pdf
|
Author Name: Harry Clarke (@HarryEClarke) Yes |
Author Name: Giovanni Manghi (@gioman) Harry Clarke wrote:
I cannot confirm in qgis master, can you check please? |
Author Name: Jürgen Fischer (@jef-n)
|
Author Name: Paolo Cavallini (@pcav)
|
Author Name: Giovanni Manghi (@gioman) Closing for lack of feedback.
|
Author Name: Teliph Andersson (Teliph Andersson) Saving a shapefile as spatialite fails for me using: Error: Feature creation error (OGR error: sqlite3_step() failed: spatialtest.GEOMETRY violates Geometry constraint [geom-type or SRID not allowed] (19)) Shapefile used: http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/50m/cultural/ne_50m_admin_0_countries.zip Steps to reproduce:
|
Author Name: Johannes Kroeger (Johannes Kroeger) Reproduced here with: QGIS version 2.4.0-Chugiak |
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Giovanni Manghi (@gioman) I added a new description to better describe the issue. |
Author Name: Giovanni Manghi (@gioman) It is more clear now where the problem may come from: until qgis 1.7.4 saving as "sqlite" (not spatialite, because the option was not available) and adding the custom option SPATIALITE=YES worked as expected. Then this option stopped to work (giving an error similar to the one decribed here or creating a non functional SL db). This should be tagged as a regression, but given the fact that there are alternatives it will be probably downgraded.
|
Author Name: Jürgen Fischer (@jef-n) Fixed in changeset "528c4cacb6beec73252477ea5e921d13741e37d8".
|
Author Name: Harry Clarke (@HarryEClarke)
Original Redmine Issue: 10584
Affected QGIS version: master
Redmine category:vectors
New description:
When trying to save a multipolygon shapefile to Spatialite using the "save as" dialog the operation fails. Actually the fail is by ogr2ogr. When using ogr2ogr from the command line it is enough to add
-nlt MULITPOLYGON
option, but in the "save as" dialog is not clear if such option can be added in the "custom options" of the same dialog.
The real issue seems that QGIS is not consistent, in fact importing into a Spatialite DB works fine for multigeometry input layers both using the Drag and Drop from the QGIS browser and using the import function of DB manager.
It also works ok using the "convert format" tool (based on ogr2ogr) of the processing toolbox (without needed to add manually any parameter).
It is not clear to me how that step made into the documentation as the very same issue affects QGIS down to 1.8 included (maybe in an earlier release it was ok).
Old Description:
On page 7 of the QGIS Training Manual, users are instructed to save the landuse layer as SpatialLite. In so doing, the following error was encountered, using the dataset as described in the training manual.
Export to vector file failed.
Error: Feature write errors:
Feature creation error (OGR error: sqlite3_step() failed:
landuse.GEOMETRY violates Geometry constraint [geom-type or SRID not allowed] (19))
Only 52 of 53 features written.
A file is created in the directory, but nothing is added to the map
Related issue(s): #19812 (relates), #19856 (relates), #20892 (relates)
Redmine related issue(s): 11542, 11597, 12796
The text was updated successfully, but these errors were encountered: