[gdal-dev] gdal_translate doesn't create GeoPackage's metadata

Gil gilpeleg at live.com
Wed Oct 3 12:12:03 PDT 2018


Hey Even,

Thanks for the quick reply and fix. Apologies for the long delay in response.
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?

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.

Many thanks,
Gil

On Wed, 5 Sep 2018 at 10:53, Even Rouault <even.rouault at spatialys.com<mailto:even.rouault at spatialys.com>> wrote:
Gil,

>
> I got two questions:
> 1) I have a question about something I believe is a bug, I recently upgraded
> from 2.0.2 to 2.3.1, when using gdal_translate to convert a GeoTiff to
> GeoPackage it doesn't create the GeoPackage's metadata tables
> (gpkg_metadata/gpkg_metadata_reference).

> If I create without the tiling scheme, like this, it works just fine, it
> creates the tables with data in them:
 gdal_translate.exe -of GPKG a.tif
> b.gpkg
>
> When specifying the tiling scheme, it doesn't create the tables (tried
> GoogleCRS84Quad / InspireCRS84Quad):
 gdal_translate.exe -co
> TILING_SCHEME=GoogleCRS84Quad -of GPKG a.tif b.gpkg
> When specifying like the above and setting CREATE_METADATA_TABLES to YES, it
> creates the tables but they are empty:
 gdal_translate.exe -co
> TILING_SCHEME=GoogleCRS84Quad -of GPKG a.tif b.gpkg  --config
> CREATE_METADATA_TABLES YES
> I don't assume this is the wanted behavior, in 2.0.2 it worked fine.

From my testing, it didn't work fine in 2.0.2 either: it just created empty
tables. I've just fixed that issue in GDAL master and backported to 2.3
branch.

>
> 2) I have another question relating to GoogleCRS84Quad, I know this may not
> be the best place to ask this and you may ignore this if you wish, I am
> trying to make sure I understand the specs correctly, as far as I
> understand level 0 has 1 tile that covers the world. Is there any alternate
> definition that says otherwise? In
> http://docs.opengeospatial.org/is/13-082r2/13-082r2.html which is a later
> dated document than the one in GDAL specs, it says that the level -1 has
> one tile and 0 has two tiles, I may just be mixing two different
> definitions, which I assume I am, but I was hoping if someone could
> clarify.

Interesting. I've added that "clarification" to the driver doc:

+NOTE: <a href="http://docs.opengeospatial.org/is/
13-082r2/13-082r2.html#30">OGC WMTS Simple Profile 13-082r2</a>
+changed the definition of GoogleCRS84Quad (so not implemented by the driver).
+The new definition includes a -1 level (that cannot be modeled in GeoPackage
given
+constraints on zoom_level being positive or 0), with a single tile at origin
-180,90
+and whose bottom 128 lines are empty. Levels 0 or greater are identical to
the
+InspireCRS84Quad tiling scheme. So for practical purposes, InspireCRS84Quad
in
+GeoPackage is conformant to the new GoogleCRS84Quad definition.

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/20181003/5c2b0ead/attachment.html>


More information about the gdal-dev mailing list