1
Solved

GDALINFO reports `bad application_id` on GeoPackage

When running `gdalinfo` on a geopackage created by MapTiler Desktop (Plus 10.0-788fb78a7d), it consistently reports:

Warning 1: GPKG: bad application_id 0x47504B47 on '<filename>.gpkg'

Here is the full output:

gdalinfo 1870.gpkg --debug on
Warning 1: GPKG: bad application_id 0x47504B47 on '1870.gpkg'
OGRCT: PROJ >= 4.8.0 features enabled
OGRCT: Using locale-safe proj version
GDAL: GDALOpen(1870.gpkg, this=0xee0cb0) succeeds as GPKG.
Driver: GPKG/GeoPackage
Files: 1870.gpkg
Size is 107, 149
Coordinate System is:
PROJCS["Google Maps Global Mercator",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.01745329251994328,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Mercator_2SP"],
    PARAMETER["standard_parallel_1",0],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",0],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["Meter",1],
    EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext  +no_defs"],
    AUTHORITY["EPSG","900913"]]
Origin = (-7953558.976533000357449,5139746.788745000027120)
Pixel Size = (76.437028285176297,-76.437028285176297)
Metadata:
  DESCRIPTION=MapTiler Desktop Plus 10.0-788fb78a7d
  IDENTIFIER=package_tiles
  ZOOM_LEVEL=11
Image Structure Metadata:
  INTERLEAVE=PIXEL
OGRCT: Source: +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +no_defs
OGRCT: Target: +proj=longlat +ellps=WGS84 +no_defs
Corner Coordinates:
Upper Left  (-7953558.977, 5139746.789) ( 71d26'52.93"W, 41d51'29.15"N)
Lower Left  (-7953558.977, 5128357.672) ( 71d26'52.93"W, 41d46'54.67"N)
Upper Right (-7945380.215, 5139746.789) ( 71d22'28.43"W, 41d51'29.15"N)
Lower Right (-7945380.215, 5128357.672) ( 71d22'28.43"W, 41d46'54.67"N)
Center      (-7949469.596, 5134052.230) ( 71d24'40.68"W, 41d49'11.95"N)
Band 1 Block=256x256 Type=Byte, ColorInterp=Red
  Mask Flags: PER_DATASET ALPHA 
Band 2 Block=256x256 Type=Byte, ColorInterp=Green
  Mask Flags: PER_DATASET ALPHA 
Band 3 Block=256x256 Type=Byte, ColorInterp=Blue
  Mask Flags: PER_DATASET ALPHA 
Band 4 Block=256x256 Type=Byte, ColorInterp=Alpha
GDAL: GDALClose(1870.gpkg, this=0xee0cb0)

I am trying to resolve it on StackExchange (https://gis.stackexchange.com/questions/306895/geoserver-exception-when-publishing-a-layer-based-on-a-geopackage-store) as well, but thought I would report it here as well to see if this is a known issue, or if there is a workaround/solution for this. The GeoPackage export is critical to my workflow, as it appears to be the only export option that is directly compatible with GeoServer.

3 replies

With version 2.3.2 I still get a warning. I believe this is still an issue with adherence to the Geopackage standard, that causes GeoServer to crash the import of GPKG files created by MapTiler.

Warning 1: GPKG: unrecognized user_version=0x00000000 (0) on '1870.gpkg'
Driver: GPKG/GeoPackage
Files: 1870.gpkg
Size is 107, 149
Coordinate System is:
PROJCS["Google Maps Global Mercator",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.01745329251994328,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Mercator_2SP"],
    PARAMETER["standard_parallel_1",0],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",0],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["Meter",1],
    EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext  +no_defs"],
    AUTHORITY["EPSG","900913"]]
Origin = (-7953558.976533000357449,5139746.788745000027120)
Pixel Size = (76.437028285176297,-76.437028285176297)
Metadata:
  DESCRIPTION=MapTiler Desktop Plus 10.0-788fb78a7d
  IDENTIFIER=package_tiles
  ZOOM_LEVEL=11
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (-7953558.977, 5139746.789) ( 71d26'52.93"W, 41d51'29.15"N)
Lower Left  (-7953558.977, 5128357.672) ( 71d26'52.93"W, 41d46'54.67"N)
Upper Right (-7945380.215, 5139746.789) ( 71d22'28.43"W, 41d51'29.15"N)
Lower Right (-7945380.215, 5128357.672) ( 71d22'28.43"W, 41d46'54.67"N)
Center      (-7949469.596, 5134052.230) ( 71d24'40.68"W, 41d49'11.95"N)
Band 1 Block=256x256 Type=Byte, ColorInterp=Red
  Mask Flags: PER_DATASET ALPHA 
Band 2 Block=256x256 Type=Byte, ColorInterp=Green
  Mask Flags: PER_DATASET ALPHA 
Band 3 Block=256x256 Type=Byte, ColorInterp=Blue
  Mask Flags: PER_DATASET ALPHA 
Band 4 Block=256x256 Type=Byte, ColorInterp=Alpha

Hi Mike, 

here is the response from our devs:

MapTiler Desktop generates GeoPackage according to the 1.2.0 specs - http://www.geopackage.org/spec120/index.html#_sqlite_container.

This version is not recognized in GDAL below 2.3.0 (like 2.2., 2.1, or 1.*).

It seems, that we are only missing the appropriate value for `user_version` - we are not aware that it was mentioned there in time we have implemented GeoPackage.

Nevertheless, none of these warnings (application_id, or missing user_version) have any negative impact on the GeoPackage file itself. The problem could be with other software which is trying to interpret it.

Best regards,

Jiri

I believe that was with GDALINFO 2.1.x .... I will see about updating to version 2.3.x and report back. Thanks

Hi Mike,

thanks for the report. However, I am not able to reproduce your issue. What version of GDAL do you have? I use GDAL 2.3.2 on Debian testing/Buster/10. 

Best regards,

Jiri