Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix WMTS document for ArcMap #818

Merged
merged 2 commits into from
May 20, 2024
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
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
Loading