[gdal-dev] How to drop a raster layer from GeoPackage?

Even Rouault even.rouault at spatialys.com
Tue Aug 22 03:14:49 PDT 2017


On mardi 22 août 2017 13:03:44 CEST Dmitry Baryshnikov wrote:
> Is it the bug of gdalmanage that this utility cannot delete raster layer
> from geopackage?

gdalmanage delete is to delete a dataset, not a raster layer. The concept of raster layer 
doesn't really exist in the GDAL abstraction. The closest we have is subdatasets.

Actually perhaps the GPKG driver could be improved so it implements the Delete() method of 
GDALDriver and recognizes subdataset names, to implement deletion of only the raster layer 
pointed by the subddataset name

So gdalmanage delete GPKG:my.gpkg:raster_layer would work then

> 
> Best regards,
>      Dmitry
> 
> 22.08.17 12:49, Even Rouault пишет:
> > On mardi 22 août 2017 09:42:40 CEST Rahkonen Jukka (MML) wrote:
> > > Hi,
> > > 
> > > 
> > > 
> > > There is an interesting question in gis.stackexchange about how to
> > 
> > remove a
> > 
> > > raster layer from GeoPackage
> > 
> > https://gis.stackexchange.com/questions/252782/remove-a-raster-from-geopac
> > k
> > 
> > > age.
> > > 
> > > 
> > > 
> > > I had a try and gdalmanage did not have any effect on the GeoPackage
> > > 
> > > database but the workflow with ogrinfo works for me. Are there any other
> > > 
> > > alternatives?
> > 
> > The manual ogrinfo way is the only one using GDAL utilities.
> > 
> > We should probably extend the -sql "DELLAYER:xxxx" syntax to work with
> > raster tables as well. Actually I see we currently also catch "DROP
> > TABLE xxxx" to drop the table and remove links in other tables in the
> > vector case (so with th same effect as DELLAYER:xxxxx). Would you mind
> > creating an enhancement ticket about that ?
> > 
> > There's ongoing work on the QGIS side (dev version only I guess) to
> > offer in the DBManager a way to delete raster layers (issuing the SQL
> > requests under the hood)
> > 
> > Even
> > 
> > 
> > Spatialys - Geospatial professional services
> > 
> > http://www.spatialys.com
> > 
> > 
> > 
> > _______________________________________________
> > gdal-dev mailing list
> > gdal-dev at lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/gdal-dev


-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170822/db3beffb/attachment.html>


More information about the gdal-dev mailing list