Skip to content

Commit

Permalink
fix WMTS document for ArcMap (#818)
Browse files Browse the repository at this point in the history
* fix WMTS document for ArcMap

* fix tests
  • Loading branch information
vincentsarago committed May 20, 2024
1 parent 481f664 commit 3fb2e4f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release Notes

## 0.18.3 (2024-05-20)

* fix `WMTSCapabilities.xml` response for ArcMap compatibility
* replace `Cloud Optimized GeoTIFF` with dataset URL or `TiTiler` for the *ows:ServiceIdentification* **title**
* replace `cogeo` with `Dataset` for the `layer` *ows:Identifier*

## 0.18.2 (2024-05-07)

* move to `fastapi-slim` to avoid unwanted dependencies (author @n8sty, https://github.com/developmentseed/titiler/pull/815)
Expand Down
2 changes: 1 addition & 1 deletion src/titiler/application/tests/routes/test_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def test_wmts(rio, app):
"http://testserver/cog/WebMercatorQuad/WMTSCapabilities.xml?url=https"
in response.content.decode()
)
assert "<ows:Identifier>cogeo</ows:Identifier>" in response.content.decode()
assert "<ows:Identifier>Dataset</ows:Identifier>" in response.content.decode()
assert (
"http://testserver/cog/tiles/WebMercatorQuad/{TileMatrix}/{TileCol}/{TileRow}@1x.png?url=https"
in response.content.decode()
Expand Down
4 changes: 2 additions & 2 deletions src/titiler/core/titiler/core/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -897,8 +897,8 @@ def wmts(
"tileMatrix": tileMatrix,
"tms": tms,
"supported_crs": supported_crs,
"title": "Cloud Optimized GeoTIFF",
"layer_name": "cogeo",
"title": src_path if isinstance(src_path, str) else "TiTiler",
"layer_name": "Dataset",
"media_type": tile_format.mediatype,
},
media_type=MediaType.xml.value,
Expand Down
2 changes: 1 addition & 1 deletion src/titiler/core/titiler/core/templates/wmts.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Capabilities xmlns="http://www.opengis.net/wmts/1.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd" version="1.0.0">
<ows:ServiceIdentification>
<ows:Title>"{{ title }}"</ows:Title>
<ows:Title>{{ title }}</ows:Title>
<ows:ServiceType>OGC WMTS</ows:ServiceType>
<ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion>
</ows:ServiceIdentification>
Expand Down
6 changes: 4 additions & 2 deletions src/titiler/mosaic/titiler/mosaic/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,8 +630,10 @@ def wmts(
"bounds": bounds,
"tileMatrix": tileMatrix,
"tms": tms,
"title": "Mosaic",
"layer_name": "mosaic",
"title": src_path
if isinstance(src_path, str)
else "TiTiler Mosaic",
"layer_name": "Mosaic",
"media_type": tile_format.mediatype,
},
media_type=MediaType.xml.value,
Expand Down

0 comments on commit 3fb2e4f

Please sign in to comment.