[osgeo4w-dev] GDAL libs without Spatialite?

Jürgen E. Fischer jef at norbit.de
Fri May 16 02:12:00 PDT 2014

Hi Giovanni,

On Fri, 16. May 2014 at 10:39:09 +0200, G. Allegri wrote:
> Running an ogr conversion I've noticed that GDAL 1.11 libs don't support
> Spatialite DB creation.

> #ogr2ogr -f SQLite mydata.sqlite mydata.shp -dsco "SPATIALITE=YES"
> It outputs a simple Sqlite DB (FDO layers) but not a Spatialite DB.
> Would it be possible to configure GDAL for it?

Works fine here - and gdal111.dll is linked against spatialite4.dll in 32 and

C:\OSGeo4W>ogr2ogr -f SQLite foo.sqlite d:\temp\ab.shp -dsco SPATIALITE=YES
Shape: DBF Codepage = UTF-8 for d:\temp\ab.shp
Shape: Treating as encoding 'UTF-8'.
OGR: OGROpen(d:\temp\ab.shp/02C2C878) succeeded as ESRI Shapefile.
SQLITE: SpatiaLite v4 DB found !
OGR2OGR: 18 features written in layer 'ab'
SQLITE: Error no such table: layer_statistics
OGR: Unloading VirtualOGR module
Shape: 18 features read on layer 'ab'.
C:\OSGeo4W>ogrinfo foo.sqlite
SQLITE: SpatiaLite v4 DB found !
OGR: OGROpen(foo.sqlite/02BB85C8) succeeded as SQLite.
INFO: Open of `foo.sqlite'
      using driver `SQLite' successful.
OGR: GetLayerCount() = 1

1: ab (Line String)
OGR: Unloading VirtualOGR module


Jürgen E. Fischer         norBIT GmbH               Tel. +49-4931-918175-31
Dipl.-Inf. (FH)           Rheinstraße 13            Fax. +49-4931-918175-50
Software Engineer         D-26506 Norden               http://www.norbit.de
QGIS PSC member (RM)      Germany                      IRC: jef on FreeNode                         

norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502

More information about the osgeo4w-dev mailing list