Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion titiler/stacapi/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""titiler.stacapi"""

__version__ = "0.3.1"
__version__ = "0.3.2"
9 changes: 6 additions & 3 deletions titiler/stacapi/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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"],
Expand Down
1 change: 1 addition & 0 deletions titiler/stacapi/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ class LayerDict(TypedDict, total=False):

id: str
collection: str
title: Optional[str]
bbox: List[float]
format: Optional[str]
style: str
Expand Down
5 changes: 3 additions & 2 deletions titiler/stacapi/templates/wmts-getcapabilities_1.0.0.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,13 @@
<Contents>
{% for layer in layers %}
<Layer>
<ows:Title>{{ layer.title or layer.id }}</ows:Title>
<ows:Title>{{ layer.id }}</ows:Title>
<ows:Abstract>{{ layer.title }}</ows:Abstract>
<ows:WGS84BoundingBox>
<ows:LowerCorner>{{ layer.bbox[0] }} {{ layer.bbox[1] }}</ows:LowerCorner>
<ows:UpperCorner>{{ layer.bbox[2] }} {{ layer.bbox[3] }}</ows:UpperCorner>
</ows:WGS84BoundingBox>
<ows:Identifier>{{ layer.id or layer.title }}</ows:Identifier>
<ows:Identifier>{{ layer.id }}</ows:Identifier>
<Style isDefault="true">
<ows:Title>default</ows:Title>
<ows:Identifier>default</ows:Identifier>
Expand Down