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

Stable URL for tile matrix sets #83

Open
tschaub opened this issue Dec 13, 2022 · 3 comments
Open

Stable URL for tile matrix sets #83

tschaub opened this issue Dec 13, 2022 · 3 comments

Comments

@tschaub
Copy link
Contributor

tschaub commented Dec 13, 2022

The tile matrix set registry links to pages describing each of the registered tile matrix sets. For example, WebMercatorQuad is described here: https://defs.opengis.net/vocprez/object?uri=http%3A//www.opengis.net/def/tilematrixset/OGC/1.0/WebMercatorQuad. This page links to GitHub for the actual tile matrix set definition: https://raw.githubusercontent.com/opengeospatial/2D-Tile-Matrix-Set/master/registry/json/WebMercatorQuad.json

This URL includes the name of the default branch (master). So if this repo ever decides to update the name of the default branch (e.g. to main), then the URL above will no longer resolve to the tile matrix set definition. An improvement would be to make use of git tags for releases. Then there would be a URL for the tag that would be stable. For example https://raw.githubusercontent.com/opengeospatial/2D-Tile-Matrix-Set/v2.0.0/registry/json/WebMercatorQuad.json if this repo used tags and had tagged v2.0.0.

It feels like it would also be a good idea for things like the definition for tile matrix sets in OGC's registry to be hosted by OGC instead of by GitHub. One benefit of using GitHub is that it is CORS-enabled (e.g. responses include access-control-allow-origin: *). The ogc.org hosted resources I've seen are not CORS-enabled. So it would only make sense to move the definitions to ogc.org if 1) they used https and 2) they were CORS-friendly.

@jerstlouis
Copy link
Member

@tschaub

It feels like it would also be a good idea for things like the definition for tile matrix sets in OGC's registry to be hosted by OGC instead of by GitHub.

Fully agreed, the intent of the GitHub registry was only to provide a source of content maintained by the Tiles SWG that the OGC definition server could host and pull from.

I hope that the Naming Authority can eventually set up the definition server to directly return the content via content negotiation from http://www.opengis.net/def/tilematrixset/OGC/1.0/WebMercatorQuad.

At the moment it redirects (rather than directly return) to application/ld+json SKOS content instead of the actual 2D Tile Matrix Set definition which is what Tiles and other 2DTMS implementations care about.

See e.g., opengeospatial/NamingAuthority#109 (that was closed), opengeospatial/NamingAuthority#198 and opengeospatial/NamingAuthority#203

cc @ghobona @avillar

@tschaub
Copy link
Contributor Author

tschaub commented Feb 13, 2023

I hope that the Naming Authority can eventually set up the definition server to directly return the content via content negotiation from http://www.opengis.net/def/tilematrixset/OGC/1.0/WebMercatorQuad.

Keep in mind that if a web page is hosted via https, a script on that page cannot generally read http resources (they cannot even follow the redirect). So redirecting from http to https might be nice for some things, but it is not a solution for a browser-based web app.

I mentioned this above, but the GitHub URLs are preferable to the OGC ones in that they use https (without redirect). The downside of the GitHub URLs is that they are not currently stable (they would be if they used tag names instead of branch names).

@jerstlouis
Copy link
Member

jerstlouis commented Feb 13, 2023

@tschaub I strongly believe that the OGC definition server, at least for the 2DTMS register, should not re-direct, for that reason and several others, not the least of which is the incredibly confusing URLs being redirected to, different from the canonical URI and containing /vocprez/object?uri=, when trying to discover, validate and share TileMatrixSet URIs. That was the essence of opengeospatial/NamingAuthority#109 .

I also believe that the OGC definition server should support https and understand the URIs as equivalent to the http ones.
That seems to be the road ahead as per opengeospatial/NamingAuthority#108 (comment) .

Also note that OGC API - Tiles server implementations are still encouraged to host their own local definitions of the 2D Tile Matrix Sets, so as not to be reliant at all on the external OGC definition server. Not for the TileSet "tileMatrixSetURI" and TileMatrixSet "uri" keys, but for the definitions linked to by "rel": "http://www.opengis.net/def/rel/ogc/1.0/tiling-scheme".

Clients can also hardcode or bundle the registered definitions and recognize them by URI string comparison if they wish to avoid extra server roundtrips.

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

No branches or pull requests

2 participants