Skip to content

Commit 3fb2e4f

Browse files
fix WMTS document for ArcMap (#818)
* fix WMTS document for ArcMap * fix tests
1 parent 481f664 commit 3fb2e4f

File tree

5 files changed

+14
-6
lines changed

5 files changed

+14
-6
lines changed

CHANGES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Release Notes
22

3+
## 0.18.3 (2024-05-20)
4+
5+
* fix `WMTSCapabilities.xml` response for ArcMap compatibility
6+
* replace `Cloud Optimized GeoTIFF` with dataset URL or `TiTiler` for the *ows:ServiceIdentification* **title**
7+
* replace `cogeo` with `Dataset` for the `layer` *ows:Identifier*
8+
39
## 0.18.2 (2024-05-07)
410

511
* move to `fastapi-slim` to avoid unwanted dependencies (author @n8sty, https://github.com/developmentseed/titiler/pull/815)

src/titiler/application/tests/routes/test_cog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def test_wmts(rio, app):
6464
"http://testserver/cog/WebMercatorQuad/WMTSCapabilities.xml?url=https"
6565
in response.content.decode()
6666
)
67-
assert "<ows:Identifier>cogeo</ows:Identifier>" in response.content.decode()
67+
assert "<ows:Identifier>Dataset</ows:Identifier>" in response.content.decode()
6868
assert (
6969
"http://testserver/cog/tiles/WebMercatorQuad/{TileMatrix}/{TileCol}/{TileRow}@1x.png?url=https"
7070
in response.content.decode()

src/titiler/core/titiler/core/factory.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -897,8 +897,8 @@ def wmts(
897897
"tileMatrix": tileMatrix,
898898
"tms": tms,
899899
"supported_crs": supported_crs,
900-
"title": "Cloud Optimized GeoTIFF",
901-
"layer_name": "cogeo",
900+
"title": src_path if isinstance(src_path, str) else "TiTiler",
901+
"layer_name": "Dataset",
902902
"media_type": tile_format.mediatype,
903903
},
904904
media_type=MediaType.xml.value,

src/titiler/core/titiler/core/templates/wmts.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<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">
22
<ows:ServiceIdentification>
3-
<ows:Title>"{{ title }}"</ows:Title>
3+
<ows:Title>{{ title }}</ows:Title>
44
<ows:ServiceType>OGC WMTS</ows:ServiceType>
55
<ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion>
66
</ows:ServiceIdentification>

src/titiler/mosaic/titiler/mosaic/factory.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,8 +630,10 @@ def wmts(
630630
"bounds": bounds,
631631
"tileMatrix": tileMatrix,
632632
"tms": tms,
633-
"title": "Mosaic",
634-
"layer_name": "mosaic",
633+
"title": src_path
634+
if isinstance(src_path, str)
635+
else "TiTiler Mosaic",
636+
"layer_name": "Mosaic",
635637
"media_type": tile_format.mediatype,
636638
},
637639
media_type=MediaType.xml.value,

0 commit comments

Comments
 (0)