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

Enhance WMTSGenerator for Multi-Layer Support #52

Open
alonakos opened this issue Feb 14, 2025 · 0 comments
Open

Enhance WMTSGenerator for Multi-Layer Support #52

alonakos opened this issue Feb 14, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@alonakos
Copy link

alonakos commented Feb 14, 2025

WMTSGenerator Multi-Layer Support

Currently, the WMTSGenerator implementation supports only a single layer per dataset. We need to include separate <Layer> elements for each statistic or data layer in the WMTS capabilities document.

Option 1: Extend the Current Class

  • Changes:
    • Modify the WMTSCapabilitiesGenerator class to support multiple layers:
      self.layers = []
    • Create an add_layer() method and call it for every layer before writing the XML in the file.
      def add_layer(self, layer_title: str, layer_identifier: str, tile_format: str, url_postfix: str, bounding_box: dict = None)
    • Update the XML generation logic to iterate over self.layers and generate a <Layer> element for each.

Option 2: Use OWSLib

  • Pros:

    • Ability to parse and modify the WMTS document post-generation.
    • Support for any OGC specifications updates.
  • Cons:

    • Introduces an external dependency.
    • More refactoring is needed compared to the current XML handling logic (from xml.etree.ElementTree to OWSLib).
@alonakos alonakos self-assigned this Feb 14, 2025
@alonakos alonakos added the enhancement New feature or request label Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant