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

Add use_epsg parameter to WMTS endpoint #782

Merged
merged 2 commits into from
Mar 6, 2024

Conversation

gadomski
Copy link
Contributor

What I am changing

Adds a use_epsg parameter to the WMTS endpoint, which changes the format of the CRS for the tile matrix set. This is needed to support ArcMap, which doesn't like the opengis.net-style CRS in the SupportedCRS.

Also adds an escape to the URLs in the WMTS template, as multiple query parameters were breaking XML parsing b/c of the &.

How you can test it

I've added unit tests. To manually test, you can hit a titiler WMTS endpoint with the parameter, e.g. http://localhost:8000/cog/WMTSCapabilities.xml?url=your-url-here&use_epsg=true and check out the SupportedCRS field.

Related Issues

Manual testing with ArcMap

This is an ArcMap WMTS configuration against titiler endpoint without any modifications:

Screenshot 2024-02-20 115746

The layer doesn't load:

Screenshot 2024-02-20 115759

Adding the use_epsg parameter:

Screenshot 2024-02-20 120041

It works!

Screenshot 2024-02-20 115916

This enables ArcMap compatability.
Without the escapes, you can only have one query parameter
@vincentsarago
Copy link
Member

thanks a lot @gadomski, really nice PR 🙏

@vincentsarago vincentsarago merged commit 6aeedbd into developmentseed:main Mar 6, 2024
9 checks passed
@gadomski gadomski deleted the wmts-epsg branch March 6, 2024 13:14
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