<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="ltr">
<div>Hey Even,</div>
<div><br>
</div>
<div>Thanks for the quick reply and fix. Apologies for the long delay in response.</div>
<div>It looks great now when converting to GPKG from tif files, however when I convert from VRT to GPKG the metadata tables aren't created, is it intended?</div>
<div><br>
</div>
<div>And regarding the GoogleCRS84Quad, thanks for adding the clarification but it does seem odd they would change it like that, I understand that Inspire is the same as the new definition, but I don't understand the backward compatability strategy of this
 change. When someone writes GoogleCRS84Quad I don't know if it means the old definition or the new one. I can always just use the definition from the WMTS capabilities file of the TileMatrix but it's unclear why they decided on the change.</div>
<div><br>
</div>
<div>Many thanks,</div>
<div>Gil<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Wed, 5 Sep 2018 at 10:53, Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Gil,<br>
<br>
> <br>
> I got two questions:<br>
> 1) I have a question about something I believe is a bug, I recently upgraded<br>
> from 2.0.2 to 2.3.1, when using gdal_translate to convert a GeoTiff to<br>
> GeoPackage it doesn't create the GeoPackage's metadata tables<br>
> (gpkg_metadata/gpkg_metadata_reference).<br>
<br>
> If I create without the tiling scheme, like this, it works just fine, it<br>
> creates the tables with data in them:<br>
 gdal_translate.exe -of GPKG a.tif<br>
> b.gpkg<br>
> <br>
> When specifying the tiling scheme, it doesn't create the tables (tried<br>
> GoogleCRS84Quad / InspireCRS84Quad):<br>
 gdal_translate.exe -co<br>
> TILING_SCHEME=GoogleCRS84Quad -of GPKG a.tif b.gpkg <br>
> When specifying like the above and setting CREATE_METADATA_TABLES to YES, it<br>
> creates the tables but they are empty:<br>
 gdal_translate.exe -co<br>
> TILING_SCHEME=GoogleCRS84Quad -of GPKG a.tif b.gpkg  --config<br>
> CREATE_METADATA_TABLES YES <br>
> I don't assume this is the wanted behavior, in 2.0.2 it worked fine.<br>
<br>
From my testing, it didn't work fine in 2.0.2 either: it just created empty <br>
tables. I've just fixed that issue in GDAL master and backported to 2.3 <br>
branch.<br>
<br>
> <br>
> 2) I have another question relating to GoogleCRS84Quad, I know this may not<br>
> be the best place to ask this and you may ignore this if you wish, I am<br>
> trying to make sure I understand the specs correctly, as far as I<br>
> understand level 0 has 1 tile that covers the world. Is there any alternate<br>
> definition that says otherwise? In<br>
> <a href="http://docs.opengeospatial.org/is/13-082r2/13-082r2.html" rel="noreferrer" target="_blank">
http://docs.opengeospatial.org/is/13-082r2/13-082r2.html</a> which is a later<br>
> dated document than the one in GDAL specs, it says that the level -1 has<br>
> one tile and 0 has two tiles, I may just be mixing two different<br>
> definitions, which I assume I am, but I was hoping if someone could<br>
> clarify.<br>
<br>
Interesting. I've added that "clarification" to the driver doc:<br>
<br>
+NOTE: <a href="<a href="http://docs.opengeospatial.org/is/" rel="noreferrer" target="_blank">http://docs.opengeospatial.org/is/</a><br>
13-082r2/13-082r2.html#30">OGC WMTS Simple Profile 13-082r2</a><br>
+changed the definition of GoogleCRS84Quad (so not implemented by the driver).<br>
+The new definition includes a -1 level (that cannot be modeled in GeoPackage <br>
given<br>
+constraints on zoom_level being positive or 0), with a single tile at origin <br>
-180,90<br>
+and whose bottom 128 lines are empty. Levels 0 or greater are identical to <br>
the<br>
+InspireCRS84Quad tiling scheme. So for practical purposes, InspireCRS84Quad <br>
in<br>
+GeoPackage is conformant to the new GoogleCRS84Quad definition.<br>
<br>
Even<br>
<br>
<br>
-- <br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
</blockquote>
</div>
</body>
</html>