Selon Jukka Rahkonen <[email protected]>: Jukka,
yes, I can also reproduce the issue, but the solution is quite easy. You'll have to convince Frank to update FWTools' sqlite3.dll to a newer one as it appears that the sqlite lib used by spatialite-gui outputs the SQLITE db in a newer format that an ancient sqlite3.dll can't read. I've managed to make it work by just dropping the DLL from http://www.sqlite.org/sqlitedll-3_6_18.zip into fwtools/bin (But note, that you won't be able to use the spatial extensions from spatialite from FWTools. GDAL/OGR needs to be compiled and linked against libspatialite for that) Best regards, Even > Hi, > > I made some trials with Spatialite and faced some problems. > My environment: > Windows Vista Business > Spatialite-GUI v.1.2.1 with Spatialite 2.3.1 inside > GDAL 1.7.0dev, FWTools 2.4.2, released 2009/06/24 > > Oddness is that ogr does not recognise Spatialite database that is > created with Spatialite-GUI. Or it does, initially after the > database is created but still without data: > C:\data\Vmap0>ogrinfo bordersdb.sqlite > INFO: Open of `bordersdb.sqlite' > using driver `SQLite' successful. > > However, once I have inported a shapefile into this database > with Spatialite-GUI Load shapefile tool it is no more recognised: > C:\data\Vmap0>ogrinfo bordersdb.sqlite > ERROR 1: Unable to fetch list of tables: unsupported file format > ERROR 1: Unable to fetch list of tables: unsupported file format > FAILURE: > Unable to open datasource `bordersdb.sqlite' with the following drivers. > > QGis version 1.3.0 build 11628 open this same Spatialite db without > problems. > > I tried also to create a Spatialite database with ogr2ogr from the same > shapefile as: > C:\data\Vmap0>ogr2ogr -f SQLite sqlite4.sqlite borders.shp > -dsco spatialite=yes > > This database is opened by all three: ogr, Spatialite-GUI and QGis. > > Is the Spatialite driver that comes with FWtools 2.4.2 outdated > or what is going on? > > By the way, there is quite a difference in file sizes if the same > shapefile is imported either by Spatialite-GUI or ogr2ogr: > > 15.09.2009 20:08 642Â 048 Spatialite-GUI_borders.sqlite > 15.09.2009 20:15 55Â 296 FWTools_borders.sqlite > > > -Jukka Rahkonen- > > > _______________________________________________ > gdal-dev mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/gdal-dev > _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
