[gdal-dev] Deleting raster layers from geopackages

andreaerdna andreaerdna at libero.it
Wed Oct 3 11:22:12 PDT 2018


Hi,
from what I've read in bug report #7013 [1] and in the message of the commit
fixing it [2],  I thought the problem of deleting a raster layer, including
all of its references in other tables, from a geopackage had been solved.
I've also read previous thread on this list [3] [4] that left me a little
confused.

However, I tried to delete a raster layer name test_dtm from test.gpkg using
(with GDAL 2.3.1 and 2.4.0dev from gisinternal):

ogrinfo -sql "DROP TABLE test_dtm" test.gpkg

but it only deleted the test_dtm table without also deleting the
corresponding records in gpkg_contents, gpkg_tile_matrix, gpkg_extensions,
etc.

There is probably something that I did not quite understand in this regard.

Any help?

Andrea Giudiceandrea

[1] "Make it easy to delete raster layers from GeoPackage"
https://trac.osgeo.org/gdal/ticket/7013
[2] "GPKG: make DELLAYER:rastertable / DROP TABLE rastertable delete the
table and all references to it"
https://github.com/OSGeo/gdal/commit/46dff90cb433ff27c83a0632dc5f6c5cf331187d
[3]
http://osgeo-org.1560.x6.nabble.com/gdal-dev-GPKG-Drop-table-but-how-to-drop-the-rest-td5288501.html
[4]
http://osgeo-org.1560.x6.nabble.com/gdal-dev-How-to-drop-a-raster-layer-from-GeoPackage-td5332121.html




--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html


More information about the gdal-dev mailing list