0

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?

CitizenFish
  • 312
  • 2
  • 13
  • The answer above does not answer my question. It relates to lading spatialite as an extension when it is already installed. I am asking about static linking so it can be distributed. I've already tried that approach – CitizenFish Apr 04 '20 at 14:57
  • "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. " <- that is the crux of my question – CitizenFish Apr 04 '20 at 14:58

0 Answers0