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

Fallback to layer id and use urn identifier in tms supportedCRS #18

Merged
merged 2 commits into from
Apr 26, 2024

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

@@ -113,7 +113,7 @@
{% for tms in tilematrixsets %}
<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
6 checks passed
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