Opened 13 months ago

Closed 7 months ago

#7013 closed enhancement (fixed)

Make it easy to delete raster layers from GeoPackage

Reported by: Jukka Rahkonen Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords:
Cc:

Description

Dropping a raster table from GeoPackege?, including all references into it from the metadata tables requires currently 5 SQL commands with ogrinfo. In addition, because of breaking foreign key constraints some commands must be send with configuration option "OGR_GPKG_FOREIGN_KEY_CHECK OFF". Find more details from https://gis.stackexchange.com/questions/252782/remove-a-raster-from-geopackage

The current workflow is too difficult for average GDAL user and inconvenient for everybody. Enhanced -sql "DELLAYER:xxxx" that drops and deletes automatically all that is needed would be a nice enhancement.

Change History (2)

comment:1 Changed 13 months ago by Even Rouault

Would be good to make "gdalmanage delete GPKG:foo.gpkg:layer_name" works also

comment:2 Changed 7 months ago by Even Rouault

Resolution: fixed
Status: newclosed

In 41708:

GPKG: make DELLAYER:rastertable / DROP TABLE rastertable delete the table and all references to it (fixes #7013)

Note: See TracTickets for help on using tickets.