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

Addressing Requirements class 2 (Requirements Class Tileset) of the OGC API Tiles Standard #1497

Merged
merged 25 commits into from
Jan 31, 2024

Conversation

doublebyte1
Copy link
Contributor

@doublebyte1 doublebyte1 commented Jan 16, 2024

Overview

According to section 8.3 of the OGC API TIles - Standard:

  • The TileMatrixSets endpoint should be advertised in the landing page
  • The TileMatrixSets endpoint retrieves a list of links to the descriptions of the tile matrix sets supported by the OGC Web API
  • The TileMatrixSet endpoint retrieves the full description of a tile matrix set supported by Web API based servers and client applications following the schema described in the OGC Two Dimensional Tile Matrix Set and Tile Set Metadata 2.0 Standard

This PR adds the TileMatrixSets endpoint, on the root path, as well as our, now hosted, definitions for the WorldCRS84Quad and WebMercatorQuad. For instance:

http://localhost:5000/TileMatrixSets
http://localhost:5000/TileMatrixSets/WorldCRS84Quad
http://localhost:5000/TileMatrixSets/WebMercatorQuad

(the format of the resources can be retrieved using content negotiation, or the f parameter).

In addition, a link with "rel" type "http://www.opengis.net/def/rel/ogc/1.0/tiling-scheme", which points to the hosted tile matrix set definition was added at the tiles collection endpoint and tile metadata endpoint. For instance:

http://localhost:5000/collections/lakes/tiles?f=json
http://localhost:5000//collections/ne_110m_populated_places_simple/tiles/WorldCRS84Quad/metadata?f=json

Related issue / discussion

#1462

Additional information

OGC API - Tiles (core): https://docs.ogc.org/is/20-057/20-057.html
OGC Two Dimensional Tile Matrix Set and Tile Set Metadata: https://docs.ogc.org/is/17-083r4/17-083r4.html#:~:text=The%20OGC%20Two%20Dimensional%20Tile,in%20OGC%2018%2D005r5%20Abstract

Dependency policy (RFC2)

  • I have ensured that this PR meets RFC2 requirements

Updates to public demo

Contributions and licensing

(as per https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md#contributions-and-licensing)

  • I'd like to contribute [feature X|bugfix Y|docs|something else] to pygeoapi. I confirm that my contributions to pygeoapi will be compatible with the pygeoapi license guidelines at the time of contribution
  • I have already previously agreed to the pygeoapi Contributions and Licensing Guidelines

Copy link
Member

@tomkralidis tomkralidis left a comment

Choose a reason for hiding this comment

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

Thanks @doublebyte1! See comments. As well, we need the associated endpoint updates (pygeoapi/flask_app.py) in the starlette and django equivalents).

pygeoapi/models/provider/base.py Show resolved Hide resolved
pygeoapi/flask_app.py Outdated Show resolved Hide resolved
pygeoapi/flask_app.py Outdated Show resolved Hide resolved
pygeoapi/flask_app.py Outdated Show resolved Hide resolved
@doublebyte1
Copy link
Contributor Author

Thanks @doublebyte1! See comments. As well, we need the associated endpoint updates (pygeoapi/flask_app.py) in the starlette and django equivalents).

@tomkralidis I added the routes for starlette, but unfortunately I am unable to run the django server. I opened an issue here: #1509

Copy link
Member

@tomkralidis tomkralidis left a comment

Choose a reason for hiding this comment

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

Merging, but I would prefer as a next step that we move the tileMatrixes in pygeoapi/models/provider/base.py into a JSON configuration and load at runtime, since the configuration looks like "data" more than something to be "baked" in code.

In the meantime, moving ahead for OATiles compliance. Great work!

@tomkralidis tomkralidis merged commit 18eeaf7 into geopython:master Jan 31, 2024
4 checks passed
@doublebyte1 doublebyte1 deleted the tms branch March 6, 2024 17:54
sjordan29 pushed a commit to LimnoTech/pygeoapi that referenced this pull request Oct 21, 2024
…GC API Tiles Standard (geopython#1497)

* - refactored mvt classes to support all implemented metadata formats, regardless of the provider

* - fixed formatting issues

* Implementing basic tile metadata methods

* Fixing yml models

* Adding additional format

* Fixing schema set on load

* Removing unused field from documentation

* - added support to TileMatrixSets endpoint
- added TileMatrixSet definitions for WorldCRS84Quad and WebMercatorQuad

* - added tiling-schemes link in the json representation of the landing page

* - added html pages for tilematrixset endpoints

* - advertise json and html representations of the tiling schemes in the landing page

* - Use api definition of Well-known TileMatrixSets in the tiling-schemes element of the tiles metadata page

* - added tiling-scheme url on tiles metadata page, for es and tippecanoe providers

* - fixed flak8 formatting errors

* - updated number of links  on the landing page, on the api test

* - Manage tile matrix set id dinamically, on tilematrix set flask endpoint

* - renamed functions to lower case

* - renamed tilematrix set functions on flask

* - Use TtileMatrixSetId parameter in tilematrixset api function

* - added support to TileMatrixSet endpoints on starlette

* - added test for tileMatrixSets api endpoint

* - added test for the tilematrixset endpoint

* - added routes for django

---------

Co-authored-by: Antonio Cerciello <[email protected]>
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.

4 participants