[gdal-dev] Creating a GeoPackage with multiple tile raster source in gdal 2.1.0

Gane R gane.prog at gmail.com
Thu May 19 04:24:59 PDT 2016


thanks for your reply,

I see the subdatasets name in gdalinfo.

Q1:
However how do I know the name of a tile raster if the GPKG has only one
tile raster source,I want to get the name as in gpkg_contents table.


Gane


On Tue, May 17, 2016 at 8:49 PM, Even Rouault <even.rouault at spatialys.com>
wrote:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20160519/bb7cfe2e/attachment-0001.html>


More information about the gdal-dev mailing list