Skip to content

Commit

Permalink
Merge pull request #18 from jverrydt/main
Browse files Browse the repository at this point in the history
Fallback to layer id and use urn identifier in tms supportedCRS
  • Loading branch information
vincentsarago authored Apr 26, 2024
2 parents c9a480a + c931465 commit aaf4249
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions titiler/stacapi/templates/wmts-getcapabilities_1.0.0.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<Contents>
{% for layer in layers %}
<Layer>
<ows:Title>{{ layer.title }}</ows:Title>
<ows:Title>{{ layer.title or layer.id }}</ows:Title>
<ows:WGS84BoundingBox>
<ows:LowerCorner>{{ layer.bbox[0] }} {{ layer.bbox[1] }}</ows:LowerCorner>
<ows:UpperCorner>{{ layer.bbox[2] }} {{ layer.bbox[3] }}</ows:UpperCorner>
Expand Down Expand Up @@ -113,7 +113,11 @@
{% for tms in tilematrixsets %}
<TileMatrixSet>
<ows:Identifier>{{ tms.id }}</ows:Identifier>
<ows:SupportedCRS>{{ tms.crs.srs }}</ows:SupportedCRS>
{% if tms.crs.to_epsg() %}
<ows:SupportedCRS>urn:ogc:def:crs:epsg::{{tms.crs.to_epsg()}}</ows:SupportedCRS>
{% else %}
<ows:SupportedCRS>{{ tms.crs.srs.replace("http://www.opengis.net/def/", "urn:ogc:def:").replace("/", ":")}} </ows:SupportedCRS>
{% endif %}
{% for matrix in tms %}
<TileMatrix>
<ows:Identifier>{{ matrix.id }}</ows:Identifier>
Expand Down

0 comments on commit aaf4249

Please sign in to comment.