Update of "mod_spatialite"
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

Artifact ID: 819fa85dc3aac249ed93e2effb2a1550be0d2839
Page Name:mod_spatialite
Date: 2014-06-25 17:03:02
Original User: sandro
Next caabe653648087d485c9f9c2b0623abffd9dc3f4
Content

back to 4.2.0-doc

Dynamically loading SpatiaLite as an extension module

Theoretical foundations

Speacking in rigorous technical terms, SpatiaLite simply is an extension to SQLite.
Consequently we are strictly required to deploy some appropriate mechanism allowing to load both binary libraries (libsqlite3 and libspatialite) and properly registering within SQLite3 the many extended Spatial SQL functions implemented by SpatiaLite.
A further compication should be taken in proper debt; libspatialite isn't a stand-alone self-contained library, and depends on several further libraries (libgeos, libproj, libxml2 and so on).

There are several possible alternative paths leading to this final goal:

How it works

libsqlite3 has the capability to dynamically load extension modules. This feature is available as a C-language API, but is avaibles as a special SQL function as well:
SELECT load_extension('mod_spatialite');
This SQL function make elementary simple (and language independent) the problem of loading any possible extension; you are simply expected to execute a rather trivial SQL statement in order to load an external extension.

Loadable extension anathomy:

back to 4.2.0-doc