I am having difficulty adding a .gpkg raster store to geoserver with the GeoPackage community plugin installed. I can successfully accomplish .gpkg in and out with EPSG:4326.

Using EPSG:3857 I can only output .gpkg from GeoServer.

Steps to reproduce are simple:

  1. add a properly 3857 georeferenced geotiff image as a independent store and layer.

  2. export the layer as GeoPackage using the GeoServer web UI. This will generate a valid 3857 gpkg.

  3. attempt to add this new GeoServer/GeoPackage generated gpkg as a new store. This fails with same error as : Is there a way to check and repair a GeoPackage GPkg file? and https://osgeo-org.atlassian.net/browse/GEOS-7166

I can extract the tiled images into a zoom/column/row.jpg pyramid but I have no idea how to import such a pyramid into GeoServer. Is there a simple raster store plugin to grab 3857 tiles from the filesystem?

  • 1
    Is this with 2.10.0? If not please upgrade and try again. There may be a bug but lots of fixes went into the geotools geopkg module for the last release – Ian Turton Nov 22 '16 at 20:18
  • Thank you. Yes I am using 2.10.x, looking at my install script I am pulling from NIGHTLY. I am going to retry and pull all plugins and binary from a fixed date and retry. I also found that the gdal native libs need to have a specific version I used version 1.1.16 – Jeffrey Giovino Nov 23 '16 at 13:05
  • Same result. In order to reproduce add this world file and run: gdal_translate -outsize 256 256 -a_srs EPSG:3857 -of GTiff <inFile> <tmpFile>.tiff geotifcp -e <worldFile> <tmpFile>.tiff <outFile>.geotiff world file of mercator NW quadrant <snip> 78271.516964 0 0 -78271.516964 -19998372.584307 19998372.584307 </snip> – Jeffrey Giovino Nov 23 '16 at 13:49
  • There are two issues I identified. – Jeffrey Giovino Dec 13 '16 at 19:21
  • 1. EPSG:3857 failed in org.geotools.geopkg.mosaic.GeoPackageReader. This needed to be hacked to set worldSpan to 2* 20037508.342789 and both x and y offset to -20037508.342789 when dealing with EPSG:3857 mvn package then copy resulting jar to geoserver/webapps/geoserver/WEB-INF/lib/ 2. I needed to relayer the vertical tile numbers in my gpkg file with sqlite3 ${db} "UPDATE ${tiles} SET tile_row=15-tile_row WHERE zoom_level=4" you need to change the 15 to 2^zoom-1 for each zoom_level – Jeffrey Giovino Dec 13 '16 at 19:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.