Skip to content

Commit c931465

Browse files
committed
fix: valid supportedCRS if tms id is no valid CRS string
1 parent e404051 commit c931465

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

+5-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,11 @@
113113
{% for tms in tilematrixsets %}
114114
<TileMatrixSet>
115115
<ows:Identifier>{{ tms.id }}</ows:Identifier>
116-
<ows:SupportedCRS>urn:ogc:def:crs:{{ tms.id }}</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)