[gdal-dev] SpatiaLite

Frank Warmerdam warmerdam at pobox.com
Wed Jul 9 09:44:22 EDT 2008


Luke Roth wrote:
> I've just noticed that SpatiaLite 2.0 has been released.  For those
> not familiar with SpatiaLite, it's a pretty full-featured spatial
> extension to SQLite (now supporting spatial indexing via R-trees, as
> well as OpenGIS functions & spatial metadata).  I know there's some
> support for SQLite in OGR, but the last time I checked it was
> incomplete; would it be worth looking into integrating this package
> into OGR instead of replicating it?  I don't know enough about the OGR
> internals to know how difficult this would be.  One possible roadblock
> would be the LGPL license, although if OGR simply links to the
> SpatiaLite DLL I imagine this would be OK.

Luke,

There are a couple ways of integrating SpatialLite.

1) One is just to add OGR support for the SpatialLite geometry format,
but not to directly take advantage of SpatialLite predicates.  They would
of course be available for direct analysis.

2) The other approach is to actually have the spatial lite extension loaded
when OGR is accessing the sqlite db.  Then we could (presumably) use
spatialite functions to access geometries, and make all the spatiallite
sql syntax available for OGR ExecuteSQL() strings passed by the user.

I've been mostly looking at the first option since it doesn't require any
special linking against spatial lite or figuring out how/when to try and
load the extension.

I'd note the LGPL license is not an issue as long as spatiallite is
kept as a distinct extension/sharedlib.  I would not however want to
include LGPL code directly in GDAL due to the complication for the
licensing involved.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the gdal-dev mailing list