Le mardi 17 mai 2016 17:08:32, Gane R a écrit : > Hi all, > > I am using a pre-build version of gdal 2.1.0. I am able to create GeoTIFF > to GeoPackage using gdal_translate. > > I see from the Geopackage specification I understand that Geopackage can > have multiple tile sources, If so > > Q1: How to I add a tilesource to an exisiting geopackage from a GeoTIFF ? > any command line or any workflow sequence will be of great help.
This is documented at http://gdal.org/drv_geopackage_raster.html . See APPEND_SUBDATASET=YES creation option, possibly combined with RASTER_TABLE. $ gdal_translate byte1.tif out.gpkg -of GPKG -co RASTER_TABLE=table1 Input file size is 20, 20 0...10...20...30...40...50...60...70...80...90...100 - done. $ gdal_translate byte2.tif out.gpkg -of GPKG -co APPEND_SUBDATASET=YES -co RASTER_TABLE=table2 Input file size is 20, 20 0...10...20...30...40...50...60...70...80...90...100 - done. > > Q2: If a geopackage has multiple Geopackage tile raster, If I wish to > convert any one to a geotiff how will I do ? Should I used OGR Select layer > or how ?? $ gdalinfo out.gpkg Driver: GPKG/GeoPackage Files: out.gpkg Size is 512, 512 Coordinate System is `' Subdatasets: SUBDATASET_1_NAME=GPKG:out.gpkg:table1 SUBDATASET_1_DESC=table1 - table1 SUBDATASET_2_NAME=GPKG:out.gpkg:table2 SUBDATASET_2_DESC=table2 - table2 Corner Coordinates: Upper Left ( 0.0, 0.0) Lower Left ( 0.0, 512.0) Upper Right ( 512.0, 0.0) Lower Right ( 512.0, 512.0) Center ( 256.0, 256.0) $ gdal_translate GPKG:out.gpkg:table1 table1.tif Input file size is 20, 20 0...10...20...30...40...50...60...70...80...90...100 - done. Even -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev