[gdal-dev] Spatialite oddness
Jukka.Rahkonen at mmmtike.fi
Mon Sep 21 03:44:27 EDT 2009
Thanks a lot. It was indeed enough to put a new dll into FWTools bin directory. Right now I am pleased enough because I can handle the data storaged in Spatialite database with both FWTools and current Spatialite programs. However, Spatialite database feels so handy that it attracts me to try delivering some data from it through Mapserver. I fear that missing spatial extensions in FWTools means lost spatial indexes and slow bounding box queries as well but I will see it soon.
I made a new FWTools bug number 2099 through bugzilla about outdated dll.
Even Rouault wrote
> Selon Jukka Rahkonen <jukka.rahkonen at mmmtike.fi>:
> 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
> Best regards,
> > 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
> > gdal-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/gdal-dev
More information about the gdal-dev