[gdal-dev] gdal_translate doesn't create GeoPackage's metadata
Even Rouault
even.rouault at spatialys.com
Wed Sep 5 00:53:45 PDT 2018
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
More information about the gdal-dev
mailing list