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

Tiles Metadata provider refactor #1482

Merged
merged 10 commits into from
Jan 15, 2024

Conversation

PascalLike
Copy link
Member

@PascalLike PascalLike commented Jan 8, 2024

Overview

Following the tiles providers refactor started by @doublebyte1

  • Adding to each provider available (mvt_tippecanoe and mvt_elastic for now) methods to return HTML, OGC Tiles Metadata (it should always be available) e TileJSON Metadata (default not implemented, available in Tippecanoe only)
  • The metadata format to return data can be indicated in the query string, making it possible to return metadata in more formats (another thing that depends on the provider)
  • Removing CUSTOM metadata (it does not make sense anymore)
  • Changing metadata HTML template to show basic info

Related issue / discussion

#1457
#1458

Additional information

There is a PR drafted for demo.pygeoapi.io when this will be merged (geopython/demo.pygeoapi.io#49). Btw this is not a breaking change. As far as I can test, this should not break anything.

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

@PascalLike PascalLike force-pushed the tilesmetadatamethods branch from 8893c2c to 199ed39 Compare January 8, 2024 16:19
Copy link
Contributor

@doublebyte1 doublebyte1 left a comment

Choose a reason for hiding this comment

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

Great work @PascalLike !! 👏🏽

When you have a moment, please remove also these lines in the docs:

metadata_format: default # default | tilejson

metadata_format: default # default | tilejson

It is also worth to remove this line:
https://github.com/geopython/demo.pygeoapi.io/blob/aa257cb51ce52dcc7b66f39be15d30b98b9ffc5e/services/pygeoapi_master/local.config.yml#L158

<script>
var select = document.getElementById('tilingScheme');
var tileset = select.value;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is problematic, because when the page loads, we arrive here with an empty "tileset" variable. It could work, if the map refreshed itself, each time we choose a tileset on the dropdown.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed here 8a7b77d

Copy link
Contributor

Choose a reason for hiding this comment

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

@PascalLike perfect! This solves the issue 👍🏽

@PascalLike
Copy link
Member Author

Great work @PascalLike !! 👏🏽

When you have a moment, please remove also these lines in the docs:

metadata_format: default # default | tilejson

metadata_format: default # default | tilejson

It is also worth to remove this line: https://github.com/geopython/demo.pygeoapi.io/blob/aa257cb51ce52dcc7b66f39be15d30b98b9ffc5e/services/pygeoapi_master/local.config.yml#L158

Thanks @doublebyte1 ! I fixed the things you suggested.

@PascalLike PascalLike marked this pull request as ready for review January 9, 2024 12:44
@doublebyte1 doublebyte1 self-requested a review January 9, 2024 13:15
pygeoapi/provider/base_mvt.py Outdated Show resolved Hide resolved
pygeoapi/provider/mvt_tippecanoe.py Show resolved Hide resolved
@francbartoli francbartoli merged commit 09cb2c0 into geopython:master Jan 15, 2024
4 checks passed
sjordan29 pushed a commit to LimnoTech/pygeoapi that referenced this pull request Oct 21, 2024
* - 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

* Change method name to generic vendor

* Keeping extra metadata info for tippecanoe provider

* Fix flake validations error

---------

Co-authored-by: doublebyte <[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.

3 participants