I am building a cross platform application that includes a mapping element. I want to use sqlite3 + spatialite as the storage engine and access it via the QSqlDatabase driver
It needs to be distributable as a single package without any install dependancies. So I do not think adding spatialite as an extension will work. This appears to require it to be installed locally arelady
Would it be enough for me to rebuild the QSQLITE plugin with spatialite support? Simply linking in the spatialite libraries and modifying the open/close calls to include:-
open
cache = spatialite_alloc_connection ();
spatialite_init_ex (handle, cache, 0);
close
spatialite_cleanup_ex (cache);
I may have massively misunderstood how spatialite works with sqlite3. But a quick inspection of the QGIS repository seems to show them taking a similar approach?