[gdal-dev] Deleting raster layers from geopackages

Even Rouault even.rouault at spatialys.com
Thu Oct 4 01:35:55 PDT 2018


On mercredi 3 octobre 2018 20:42:48 CEST andreaerdna wrote:
> Even Rouault-2 wrote
> 
> > GDALGeoPackageDataset::DeleteVectorOrRasterLayer() should be extented to
> > look
> > for '2d-gridded-coverage' in the test that detects if it is a raster or
> > vector
> > layer.
> 
> Thank you very much for your help and for your patience in reviewing the PR!
> 
> I'd like to add a gpkg_delete_gridded_coverage_raster_layer() test very
> similar to gpkg_delete_raster_layer(), using data/float32.tif instead of
> data/byte.tif as input layer, but I wonder why using 2.3.1 or 2.4.0dev
> 
>     gdal_translate -of GPKG -co "RASTER_TABLE=foo" float32.tif float32.gpkg
> 
> doesn't create gpkg_metadata and gpkg_metadata_reference, while for byte.tif
> they are created and populated (and added to gpkg_extensions); using 2.2.4
> (OSGeo4W) they are created also for float32.tif.

Ah, this is very subtle. byte.tif or float32.tif only contains 
AREA_OR_POINT=Area metadata. When converting byte.tif to GPKG, this requires 
creating gpkg_metadata to encode it. But when converting float32.tif, we can 
use the 'grid_cell_encoding' column of gpkg_2d_gridded_coverage_ancillary to 
encode this.
Simply add -mo FOO=BAR to add an extra metadata item.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list