diff --git a/CHANGELOG.md b/CHANGELOG.md index 1263dc4..b23a2db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## [Unreleased] +## [0.3.2] - 2025-05-19 + +* Align ows:Title, Identifier and Abstract in WMTS GetCapabilities (author @jverrydt, https://github.com/developmentseed/titiler-stacapi/pull/31) + ## [0.3.1] - 2025-02-25 * use only cql2-text for GET request filter parameter (author @jverrydt, https://github.com/developmentseed/titiler-stacapi/pull/30) diff --git a/titiler/stacapi/__init__.py b/titiler/stacapi/__init__.py index e54001f..f1a1cba 100644 --- a/titiler/stacapi/__init__.py +++ b/titiler/stacapi/__init__.py @@ -1,3 +1,3 @@ """titiler.stacapi""" -__version__ = "0.3.1" +__version__ = "0.3.2" diff --git a/titiler/stacapi/factory.py b/titiler/stacapi/factory.py index 2170bfc..d2e436a 100644 --- a/titiler/stacapi/factory.py +++ b/titiler/stacapi/factory.py @@ -586,15 +586,17 @@ def get_layer_from_collections( # noqa: C901 tilematrixsets = render.pop("tilematrixsets", None) output_format = render.pop("format", None) aggregation = render.pop("aggregation", None) + title = render.pop("title", None) _ = render.pop("minmax_zoom", None) # Not Used _ = render.pop("title", None) # Not Used # see https://github.com/developmentseed/eoAPI-vito/issues/9#issuecomment-2034025021 - render_title = f"{collection.id}_{name}" + render_id = f"{collection.id}_{name}" layer = { - "id": render_title, + "id": render_id, "collection": collection.id, + "title": title, "bbox": [-180, -90, 180, 90], "style": "default", "render": render, @@ -707,9 +709,10 @@ def get_layer_from_collections( # noqa: C901 ) layer["query_string"] = str(qs) - layers[render_title] = LayerDict( + layers[render_id] = LayerDict( id=layer["id"], collection=layer["collection"], + title=layer.get("title"), bbox=layer["bbox"], format=layer.get("format"), style=layer["style"], diff --git a/titiler/stacapi/models.py b/titiler/stacapi/models.py index 0ea5c25..04ae98d 100644 --- a/titiler/stacapi/models.py +++ b/titiler/stacapi/models.py @@ -114,6 +114,7 @@ class LayerDict(TypedDict, total=False): id: str collection: str + title: Optional[str] bbox: List[float] format: Optional[str] style: str diff --git a/titiler/stacapi/templates/wmts-getcapabilities_1.0.0.xml b/titiler/stacapi/templates/wmts-getcapabilities_1.0.0.xml index 9bc6bec..58671c9 100644 --- a/titiler/stacapi/templates/wmts-getcapabilities_1.0.0.xml +++ b/titiler/stacapi/templates/wmts-getcapabilities_1.0.0.xml @@ -57,12 +57,13 @@ {% for layer in layers %} - {{ layer.title or layer.id }} + {{ layer.id }} + {{ layer.title }} {{ layer.bbox[0] }} {{ layer.bbox[1] }} {{ layer.bbox[2] }} {{ layer.bbox[3] }} - {{ layer.id or layer.title }} + {{ layer.id }}