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

Jukka Rahkonen jukka.rahkonen at maanmittauslaitos.fi
Thu May 19 10:20:54 PDT 2016


Gane R <gane.prog <at> gmail.com> writes:

> 
> 
> 
> I see the usage of the gdalinfo for the gpkg with multiple tile source as
Subdataset,
> 
> 
> 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?

Hi,

I am not sure if I understood what you mean, but GeoPackage is a database
and you can use SQL and ogrinfo for doing anything that is possible with SQL. 

ogrinfo test.gpkg -sql "select table_name, data_type from gpkg_contents
where data_type='tiles'"
INFO: Open of `test.gpkg'
      using driver `GPKG' successful.

Layer name: SELECT
Geometry: None
Feature Count: 2
Layer SRS WKT:
(unknown)
table_name: String (0.0)
data_type: String (0.0)
OGRFeature(SELECT):0
  table_name (String) = one
  data_type (String) = tiles

OGRFeature(SELECT):1
  table_name (String) = two
  data_type (String) = tiles


-Jukka Rahkonen-



More information about the gdal-dev mailing list