[gdal-dev] GeoPackage fails after touching it with Spatialite-gui
Jukka Rahkonen
jukka.rahkonen at mmmtike.fi
Mon Feb 17 07:03:44 PST 2014
Hi,
There are no GUI-tools for managing GeoPackage databases at the moment and
because after all they are only SQLite db files just like Spatialite files I
thought it would be a good idea to do some maintenance work for GPKG
database with Spatialite-gui.
I could do a few things with Spatialite-gui without troubles: create a view,
create an index, add column. But then I renamed one table and after that I
cannot use the DB file with GPKG driver any more. SQLite driver does open it
but db is unusable because the geometry BLOBs are different. I have received
two king of error messages from ogrinfo and also a sudden program crash. One
error message is:
ogrinfo test.gpkg
ERROR 1: bad application_id on 'test.gpkg'
ERROR 1: bad application_id on 'test.gpkg'
FAILURE:
Unable to open datasource `test.gpkg' with the following drivers.
Another message is:
ogrinfo test.gpkg
ERROR 1: (null)
INFO: Open of `test.gpkg'
using driver `GPKG' successful.
To reproduce the error create a GeoPackage with GDAL, open it with
Spatialite-gui and rename one table. I know it is perhaps not a good idea to
rename a GeoPackage table with "ALTER TABLE ... RENAME TO ..." because it
breaks the integrity, but on the other hand, because it seems to be possible
to do so without any triggers and constraints preventing the operation and
the result is an unusable database it could be worth having a look on what
happens.
-Jukka Rahkonen-
More information about the gdal-dev
mailing list