Skip to content

Filter out ExtendedCapabilities when reading WebMapTileService#968

Merged
geographika merged 1 commit into
geopython:masterfrom
geographika:fix-965
Feb 12, 2025
Merged

Filter out ExtendedCapabilities when reading WebMapTileService#968
geographika merged 1 commit into
geopython:masterfrom
geographika:fix-965

Conversation

@geographika
Copy link
Copy Markdown
Contributor

Fix for #965.

Tested with the following:

from owslib.wmts import WebMapTileService
service_url = "https://api.dataforsyningen.dk/dhm_bluespot_ekstremregn?token=f3ecb52320902f733a433aa9945d8dc8&"
wmts = WebMapTileService(service_url)

tile = wmts.gettile(layer='bluespot_ekstremregn_0',
                    tilematrixset='View1', tilematrix='L00',
                    row=0, column=0, format="image/png")
print(tile.info()['Content-Type'])

# without fix - AttributeError: 'OperationsMetadata' object has no attribute 'name'

CC @CJGutz - can you check if this fixes it for you.

I'm considering adding a "live" test for this pointing to https://api.dataforsyningen.dk but endless test failures due to service changes are a concern. Long-term it may be better to spin up a local test server and return local XML and other files.

Copy link
Copy Markdown

@CJGutz CJGutz left a comment

Choose a reason for hiding this comment

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

Yes, this works for me. Thank you!

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