<html><head><style type="text/css">body {word-wrap: break-word; background-color:#ffffff;}</style></head><body><div style="font-family: sans-serif; font-size: 16px">The 4.0 version should come with a utility, spatialite_convert, to downgrade a database to be version 3.0 compatible. Worth a try.<br><br>--<br>Micha Silver<br><a href="tel:0523665918">052-366-5918</a></div><br><br>-----Original message-----<br><blockquote style="; border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><div style="font-family: sans-serif; font-size: 14px"><b>From: </b>Donovan Cameron <sault.don@gmail.com><b><br>To: </b>qgis-user@lists.osgeo.org<b><br>Sent: </b>Sun, 09 Dec 2012, 21:23:11 GMT+02:00<b><br>Subject: </b>Re: [Qgis-user] Cannot add sqlite/spatialite layers to qgis (they come in as tables)<br><br></div>I guess that confirms it then Alex. The QGIS 'about' window even says<br>I have spatialite 4.0.0 installed.<br><br>QGIS version 1.8.0-Lisboa<br>QGIS code revision exported<br>Compiled against Qt 4.8.1<br>Running against Qt 4.8.1<br>Compiled against GDAL/OGR 1.9.2<br>Running against GDAL/OGR 1.9.2<br>GEOS Version 3.3.6<br>PostgreSQL Client Version 9.1.1<br>SpatiaLite Version 4.0.0<br>QWT Version 5.2.2<br><br><br>I'll let the package maintainers know that QGIS should actually be<br>built with spatialite v3 in mind.<br><br>On Sun, Dec 9, 2012 at 12:16 PM, Alex Mandel <tech_dev@wildintellect.com> wrote:<br>> The plugin requires pyspatialite but QGIS itself has the provider built in.<br>><br>> "SpatiaLite version ..: 4.0.0"<br>><br>> Grab an older version of the Spatialite GUI (1.4 or 1.5) or figure out<br>> how to convert your db to the 3.x variant (I believe the release notes<br>> mention this is possible). The metadata table changed between 3 and 4<br>> and QGIS does not have the version 4 stuff yet (it only came out a few<br>> weeks ago).<br>><br>> Thanks,<br>> Alex<br>><br>> On 12/09/2012 11:11 AM, Donovan Cameron wrote:<br>>> Thanks alex, that's definitely helpful.<br>>> I tried to install pyspatialite with easy_install and it tries to grab<br>>> "Best match: pyspatialite 3.0.1" which fails with a lot of errors...<br>>><br>>> I can run through the tutorials from the spatialite page and this is the<br>>> initial output, telling me I am using spatialite 4:<br>>> SpatiaLite version ..: 4.0.0    Supported Extensions:<br>>>         - 'VirtualShape'        [direct Shapefile access]<br>>>         - 'VirtualDbf'          [direct DBF access]<br>>>         - 'VirtualXL'           [direct XLS access]<br>>>         - 'VirtualText'         [direct CSV/TXT access]<br>>>         - 'VirtualNetwork'      [Dijkstra shortest path]<br>>>         - 'RTree'               [Spatial Index - R*Tree]<br>>>         - 'MbrCache'            [Spatial Index - MBR cache]<br>>>         - 'VirtualSpatialIndex' [R*Tree metahandler]<br>>>         - 'VirtualFDO'          [FDO-OGR interoperability]<br>>>         - 'SpatiaLite'          [Spatial SQL - OGC]<br>>> PROJ.4 version ......: Rel. 4.8.0, 6 March 2012<br>>> GEOS version ........: 3.3.6-CAPI-1.7.6<br>>> SQLite version ......: <a href="3.7.12.1">3.7.12.1</a><br>>><br>>> I only installed QGIS from the GEO openSUSE repo.<br>>> I wonder if this is a dependency issue for the package maintainers?<br>>><br>>> I have a freshly installed 12.2 KDE on a laptop and that also shows the<br>>> same output from above when creating a new sqlite db from spatialite.<br>>><br>>><br>>> On Sun, Dec 9, 2012 at 12:00 PM, Alex Mandel <tech_dev@wildintellect.com>wrote:<br>>><br>>>> On 12/09/2012 10:40 AM, Donovan Cameron wrote:<br>>>>> I created a sqlite/spatialite db from the spatialite_gui and started to<br>>>>> import a bunch of shapefiles.<br>>>>><br>>>>> Some of the things I set were the CRS to EPSG:3005 "BC Albers" and<br>>>> the_geom<br>>>>> as the name for the geometry field (type is set to auto...)<br>>>>><br>>>>> Then in spatialite_gui I expanded each new table and built a spatial<br>>>> index.<br>>>>> I can also right click each the_geom table and see a valid "Map Preview".<br>>>>><br>>>>> But I can't open or load this .sqlite files into either spatialite_gis or<br>>>>> qgis.<br>>>>> So I think this could be a problem with my actual OS (openSUSE 12.2 x64<br>>>> w/<br>>>>> KDE).<br>>>>><br>>>>> QGIS loads the layers as tables, not vectors.<br>>>>> spatialite_gis thrown an error:<br>>>>><br>>>>> Missing or invalid Spatial Metadata tables:<br>>>>> - spatial_ref_sys<br>>>>> - geometry_columns<br>>>>><br>>>>> Sorry, cowardly quitting ...<br>>>>><br>>>>> But those tables are in the .sqlite db under the "Metadata" portion.<br>>>>><br>>>>> From the layer menu in QGIS, I can't create a layer in a sqlite db. It<br>>>> says<br>>>>> that my layer is invalid and can't be created. Then I can't even see this<br>>>>> sqlite database (that got created successfully, it's just the layer that<br>>>>> failed creation) when navigating from the add vector window. But I can<br>>>> see<br>>>>> it when trying to load from spatialite_gis but that throws the same<br>>>> error.<br>>>>><br>>>>> I noticed in the DB Manager plugin, it says that pyspatialite is missing<br>>>>> and that package isn't available for openSUSE in the open build service,<br>>>>> unless it goes by a different name...<br>>>>><br>>>><br>>>> to solve the missing pyspatialite:<br>>>> easy_install pyspatialite<br>>>> OR<br>>>> pip install pyspatialite<br>>>><br>>>> packages for above commands<br>>>> python-setuptools<br>>>> python-pip or python-distrubute<br>>>><br>>>> Keep in mind that many python packages do not come in the distros but<br>>>> are platform independent and easy to install from the pypi python repo<br>>>> using setup tools or pip.<br>>>><br>>>> This doesn't solve your original issue. What version of spatialite are<br>>>> you using. QGIS doesn't support the new 4.0 stuff yet...<br>>>><br>>>> Thanks,<br>>>> Alex<br>>>><br>>><br>>><br>>><br>>> _______________________________________________<br>>> Qgis-user mailing list<br>>> Qgis-user@lists.osgeo.org<br>>> <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>>><br>><br>_______________________________________________<br>Qgis-user mailing list<br>Qgis-user@lists.osgeo.org<br><a href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br><br>This mail was received via Mail-SeCure System.<br><br><br></blockquote></body></html>