Skip to content

Conversation

@jverrydt
Copy link
Contributor

Fallback to layer id if the title is empty because some capability parsers use this ows:Title as the identifier.

Use urn identifier in TMS supportedCRS as this is following the WMTS spec. Also found some processor failing on the srs. Spec example: https://schemas.opengis.net/wmts/1.0/examples/wmtsGetCapabilities_response.xml

<TileMatrixSet>
<ows:Identifier>{{ tms.id }}</ows:Identifier>
<ows:SupportedCRS>{{ tms.crs.srs }}</ows:SupportedCRS>
<ows:SupportedCRS>urn:ogc:def:crs:{{ tms.id }}</ows:SupportedCRS>
Copy link
Member

@vincentsarago vincentsarago Apr 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not valid, a TMS identifier is not always a valid SRS/CRS string

what we could do is use tms.crs.to_epsg()

{% 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 %}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, modified it in PR

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't have tests for the WMTS endpoint so could you tests those change before we merge?

@vincentsarago vincentsarago self-requested a review April 26, 2024 13:44
@vincentsarago vincentsarago merged commit aaf4249 into developmentseed:main Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants