geosolutions-it/osm-styles

geopackage not readable by gs 2.18

Closed this issue · 5 comments

I've followed the README to publish osm data on a 2.18 GeoServer (the one that is in use with geonode).
All works except the datastore for the lowres geopackage layers shows an empty layer list.
If others run into this, this is how I solved it

  1. PRAGMA application_id is 1196444487 -> changed it to 1196437808 (unsure if this is really needed)
  2. Some tables set FID as double -> changed FID to INTEGER (64bit)

After these changes the geopackage can be read and works.
I provide the changed geopackage under the following link:
https://www.dropbox.com/s/n0i65cwx190xwm6/osm-lowres.gpkg?dl=0

aaime commented

The application_id issue is there for older versions of GeoServer, which were supporting only GPKG 1.0/1.1. Quoting from the spec:

PRAGMA application_id
- 1196444487 (the 32-bit integer value of 0x47504B47 or GPKG in ASCII) for GPKG 1.2 and greater
- 1196437808 (the 32-bit integer value of 0x47503130 or GP10 in ASCII) for GPKG 1.0 or 1.1
``

I cannot say anything about the FIDs.. strange though, we have been using that GPKG In demos and the tiles served on geoserver.org come from a GeoServer 2.18.x...

Thanks for your reply Andrea. So it's not the fid. good to know!

But the strange thing is that version 1196444487 did not work on GeoServer 2.18?
From what I understand 1196444487 is the newer version. And geoserver 2.18 is not that old?

aaime commented

Support for the new code has been added May 27th 2021... not that long ago either:
https://osgeo-org.atlassian.net/browse/GEOT-6898
Not sure if the version of GeoServer used by GeoNode is recent enough to have that change.

Update: probably not recent enough: https://github.com/GeoNode/geonode/releases/tag/3.2.1
The release notes claims usage of GeoServer 2.18.3, but the above fix is included in 2.18.4.

Great, thanks @aaime now it's clear.