[Qgis-user] Accessing Spatialite 3.0.1 in QGIS 1.8 using Python Console
richard burcher
drownedfrog at gmail.com
Sun Jul 8 17:41:41 PDT 2012
i believe that pysqlite2 is named sqlite3.
i was able to access the spatial functions. thx for helping point me in the
right direction!
to update, i've since removed the standalone version & moved to the osgeo4w
installer. current setup:
qgis 1.8.0-3
pyspatialite 2.3.1-3
gone with pyspatialite so i don't need to worry bout loading the extensions.
figured this would be easier & reduce an area where i may be loading the
incorrect spatial.dlls.
test db contains a multipolygon feature.
this is the code i'm using:
from pyspatialite import dbapi2 as db
conn=db.connect("C:/../../../test2.sqlite")
cur=conn.cursor()
rs=cur.execute("SELECT sqlite_version(),spatialite_version()")
for row in rs:
msg=">SQLITE v%s Spatialite v%s" %(row[0],row[1])
print msg
SQLITE v3.7.10 Spatialite v3.0.1
cheers,
richard
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Accessing-Spatialite-3-0-1-in-QGIS-1-8-using-Python-Console-tp4986619p4986802.html
Sent from the Quantum GIS - User mailing list archive at Nabble.com.
More information about the Qgis-user
mailing list