[Qgis-user] QspatiaLite Plugin: need SpatiaLite installed?

Chrest, David davidc at rti.org
Tue Nov 12 04:25:06 PST 2013


Lee, OK thanks so much! Didn't realize those were old versions on that
download page. Glad to see that is all there is to it not working. I'm
just a newbie who has been entrenched in ESRI software since 1995 and am
finally seeing the light and learning about all these free and
opensource goodies like SpatiaLite.

 

David

 

From: Lee Hachadoorian [mailto:lee.hachadoorian at gmail.com] On Behalf Of
Lee Hachadoorian
Sent: Tuesday, November 12, 2013 3:24 AM
To: Chrest, David
Cc: qgis-user at lists.osgeo.org
Subject: Re: [Qgis-user] QspatiaLite Plugin: need SpatiaLite installed?

 

On 11/11/2013 04:50 PM, Chrest, David wrote:



I installed the new QspatiLite plugin and my test-2.3.sqlite database I
downloaded from http://www.gaia-gis.it/spatialite-2.3.1/resources.html
is listed but I cannot view anything in My Tables, Spatial Index, Sys.
Table in the Tables tree. There is not even a plus sign next to these
items to view anything.

I can't do anything with this plugin. Yet I can easily view the same
spatialite database with the DB Manager plugin.

 

I get this error message when I first go to use and click on the
QspatiaLite plugin:

The SQL query seems to be invalid.

no such table: views_geometry_columns.

 

I click OK then get this message:

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) ?

 

If I choose No, the plugin opens and I can't do anything,
test-2.3.sqlite is listed but I cannot view any data.

If I choose yes, then I get this message: Unable to convert Database to
SpatiaLite. I click OK and the same thing happens.

 

Do I need to install SQLite and SpatiaLite or am I doing something
wrong?

Everything works great in the DB Manager and I can view the geographic
points, line, polygons just fine in QGIS.

 

Thanks for any help.

David

 

David,

The test DB you downloaded is for an old SpatiaLite version, and does in
fact lack a views_geometry_columns table. The current version is 4.1.
Although some people are still using 3.0, I don't think 2.x is very
common anymore, and I doubt whether the developer would be interested in
adding support for it. You should try testing with a newer SpatiaLite
DB. I don't think Gaia-SINS hosts test DBs in the newer formats, but you
can convert the one you downloaded with: 

    spatialite_convert -d test-2.3.sqlite -v 4

Although lack of a SpatiaLite install is not the cause of the problem,
presumably access to the spatialite_convert utility *would* require a
SpatiaLite install. After running the convert, QSpatiaLite opens the
database file just fine. Note that conversion does not alter your
geographic data in any way, it merely alters the supporting tables (like
adding views_geometry_columns if converting from 2.x to 3 or 4, and
deleting it if moving in the other direction). 

More info on the conversion utility at
https://www.gaia-gis.it/fossil/libspatialite/wiki?name=switching-to-4.0
(almost all the way to the bottom of the page).

Best,
--Lee

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20131112/60f6a1cc/attachment.html>


More information about the Qgis-user mailing list