GeoServer generates invalid GeoPackage raster mosaics

Description

I have generated a GeoPackage raster mosaic using GeoServer WMS, with the GeoPackage output format (GeoServer version 2.11, latest nightly build). GeoServer is able to read and display this GeoPackage without issues.

Examining the GeoPackage with an SQLite viewer, for zoom level 1 I see the (0,0) tile is at -180,-90 (bottom-left) and the (3,1) tile is at 180,90 (top-right).

According to the [GeoPackage specification | ​http://www.geopackage.org/spec/#tile_matrix]:

The tile coordinate (0,0) always refers to the tile in the upper left corner of the tile matrix at any zoom level, regardless of the actual availability of that tile.

Consequently, the geopackage is getting generated incorrectly.

This is causing issues when viewing the GeoPackage in applications such as QGIS.

Environment

None

Status

Assignee

Torben Barsballe

Reporter

Torben Barsballe

Triage

None

Fix versions

Affects versions

None

Components

Priority

Medium
Configure