Skip to content

Commit aaf4249

Browse files
Merge pull request #18 from jverrydt/main
Fallback to layer id and use urn identifier in tms supportedCRS
2 parents c9a480a + c931465 commit aaf4249

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

titiler/stacapi/templates/wmts-getcapabilities_1.0.0.xml

+6-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
<Contents>
5858
{% for layer in layers %}
5959
<Layer>
60-
<ows:Title>{{ layer.title }}</ows:Title>
60+
<ows:Title>{{ layer.title or layer.id }}</ows:Title>
6161
<ows:WGS84BoundingBox>
6262
<ows:LowerCorner>{{ layer.bbox[0] }} {{ layer.bbox[1] }}</ows:LowerCorner>
6363
<ows:UpperCorner>{{ layer.bbox[2] }} {{ layer.bbox[3] }}</ows:UpperCorner>
@@ -113,7 +113,11 @@
113113
{% for tms in tilematrixsets %}
114114
<TileMatrixSet>
115115
<ows:Identifier>{{ tms.id }}</ows:Identifier>
116-
<ows:SupportedCRS>{{ tms.crs.srs }}</ows:SupportedCRS>
116+
{% if tms.crs.to_epsg() %}
117+
<ows:SupportedCRS>urn:ogc:def:crs:epsg::{{tms.crs.to_epsg()}}</ows:SupportedCRS>
118+
{% else %}
119+
<ows:SupportedCRS>{{ tms.crs.srs.replace("http://www.opengis.net/def/", "urn:ogc:def:").replace("/", ":")}} </ows:SupportedCRS>
120+
{% endif %}
117121
{% for matrix in tms %}
118122
<TileMatrix>
119123
<ows:Identifier>{{ matrix.id }}</ows:Identifier>

0 commit comments

Comments
 (0)