[gdal-dev] Get a List of tiles source name from the gpkg_content

Gane R gane.prog at gmail.com
Thu May 19 07:19:36 PDT 2016

I see the usage of the gdalinfo for the gpkg with multiple tile source as
I also saw the source code of gdalinfo getting the subdataset

*Q1: Can I get a list of tiles source name (table_name) in gpkg_contents
data_type as tiles?Is there any API call*
*or only by the following code ?*

char **papszSubdatasets = GDALGetMetadata( hDataset, "SUBDATASETS" );
        int nSubdatasets = CSLCount( papszSubdatasets );

char szKeyName[1024];
            char *pszSubdatasetName;

            snprintf( szKeyName, sizeof(szKeyName),
                      "SUBDATASET_%d_NAME", psOptionsForBinary->nSubdataset
            szKeyName[sizeof(szKeyName) - 1] = '\0';
            pszSubdatasetName =
                CPLStrdup( CSLFetchNameValue( papszSubdatasets, szKeyName )

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20160519/5ec4d123/attachment.html>

More information about the gdal-dev mailing list