From 3a4b2f1fecb31c718de7da134d61673d9bf7c3e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Satabin?= Date: Mon, 24 Nov 2025 17:56:45 +0100 Subject: [PATCH 1/2] Fix WMTSFacade provider 'style' query parameter is mandatory according to WMTS 1.0.0 standard. For backwards compatibility, empty string remains as default value. --- docs/source/publishing/ogcapi-tiles.rst | 1 + pygeoapi/provider/wmts_facade.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/source/publishing/ogcapi-tiles.rst b/docs/source/publishing/ogcapi-tiles.rst index 5a72f2b56..a8b2ad843 100644 --- a/docs/source/publishing/ogcapi-tiles.rst +++ b/docs/source/publishing/ogcapi-tiles.rst @@ -196,6 +196,7 @@ This code block shows how to configure pygeoapi to read map tiles from a WMTS. options: wmts_layer: camb:hex350_grid_mental_1920 # the layer name of the wmts wmts_tile_matrix_set: WebMercatorQuad # the name of the tile matrix set of the wmts. + wmts_style: camb:hex350_grid_mental_1920 # the style identifier of the wmts. Default to empty scheme: WebMercatorQuad # the aligning scheme in pygeoapi. zoom: min: 0 diff --git a/pygeoapi/provider/wmts_facade.py b/pygeoapi/provider/wmts_facade.py index b15a2da13..fa3b86d3b 100644 --- a/pygeoapi/provider/wmts_facade.py +++ b/pygeoapi/provider/wmts_facade.py @@ -161,7 +161,7 @@ def get_tiles(self, layer=None, tileset=None, 'tileMatrix': z, 'tileRow': y, 'tileCol': x, - 'style': '' + 'style': self.options.get('wmts_style', '') } if '?' in self.data: From 5be142899901508bbbf731f1a87b3862b9d4b7c1 Mon Sep 17 00:00:00 2001 From: Jo Date: Tue, 9 Dec 2025 19:20:01 +0000 Subject: [PATCH 2/2] Update wmts_style description for clarity Clarified wmts_style description in ogcapi-tiles.rst. --- docs/source/publishing/ogcapi-tiles.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/publishing/ogcapi-tiles.rst b/docs/source/publishing/ogcapi-tiles.rst index a8b2ad843..a977749c8 100644 --- a/docs/source/publishing/ogcapi-tiles.rst +++ b/docs/source/publishing/ogcapi-tiles.rst @@ -196,7 +196,7 @@ This code block shows how to configure pygeoapi to read map tiles from a WMTS. options: wmts_layer: camb:hex350_grid_mental_1920 # the layer name of the wmts wmts_tile_matrix_set: WebMercatorQuad # the name of the tile matrix set of the wmts. - wmts_style: camb:hex350_grid_mental_1920 # the style identifier of the wmts. Default to empty + wmts_style: camb:hex350_grid_mental_1920 # the style identifier of the wmts. If empty or this key is missing, it falls back to the default style. scheme: WebMercatorQuad # the aligning scheme in pygeoapi. zoom: min: 0