8

I've been trying to create a new spatialite database within QGIS 1.8 (SpatiaLite Version 3.0.1; QSpatialite 6.0.3) and keep getting this error: "The SQL query seems to be invalid. no such table: views_geometry_columns" and then "This DataBase seems to be a valid SQLite DataBase but not a valid SpatiaLite One, Would you like QSpatiaLite to automatically transform it to SpatiaLite (information won't be lost) ?" and after "Yes" comes "Unable to convert Database to SpatiaLite".

What am I doing wrong? There was no problems with old version (QGIS 1.7.4 and QSpatialite 5.0.3).

Please advise regarding creating a new Spatialite database.


Spatialite-gui did the trick. You just have to have right SRID. Here is the SRID list http://drupalcode.org/project/geo.git/blob/ee3f75649e4b01dfd27d8e35b222a2b51c93d706:/srid.inc

GforGIS
3,3954 gold badges23 silver badges40 bronze badges
asked Aug 23, 2012 at 21:19
4
  • 3
    Can you explain the steps you are taking to get this error message? Commented Aug 23, 2012 at 21:59
  • You get this error, if you save a layer with "Save as...". Best way is Layer-> Add new Layer -> New spatialite layer, and then the three points to create a new database. Commented Aug 24, 2012 at 4:19
  • 0down vote accept Spatialite-gui did the trick. You just have to have right SRID. Here is the SRID list drupalcode.org/project/geo.git/blob/… Thank you all for your effort and time! Commented Aug 24, 2012 at 19:03
  • I have spatialite 2.0.1, qgis 1.8.0 and qspatialite 6.0.7 and I still have the problem. Somebody knows a solution to fixe the bug ? Commented Mar 15, 2013 at 13:47

3 Answers 3

6

Qspatialite is incompatible with spatialite 3 (see http://code.google.com/p/qspatialite/issues/detail?id=6) and AFAIK DB Manager is incompatible too. Use spatialite-gui (https://www.gaia-gis.it/fossil/spatialite_gui/index) to manage your database and ogr2ogr to add or export layers. Or install spatialite 2.x.

RyanKDalton
23.3k19 gold badges114 silver badges180 bronze badges
answered Aug 24, 2012 at 7:41
4

This is a known bug. Now fixed in QSpatiaLite v 6.0.6

RIVIERE Romain QSpatiaLite Developer

answered Feb 25, 2013 at 11:30
2

I think there are problems with QSpatialite and more recent versions of QGIS. If you have spatialite-gui this is good for creating Spatialite DBs and populating them. You could try running "spatialite_gui" from a terminal (without the quotation marks) to see if you have it installed. I can't remember if my spatialite-gui came with QGIS or whether I installed it separately, sorry.

answered Aug 24, 2012 at 7:34
1
  • 1
    spatialite-gui is available here. Agreed - I find it much much easier to work with than the QGIS interface to spatialite. Commented Aug 24, 2012 at 15:28

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.