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

Implement local caching for WMTS requests #2316

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

dnowacki-usgs
Copy link

This is an in-progress PR to implement local caching of WMTS image tiles. It is based heavily on the caching approach and code implemented in #1533. No tests added yet; this is really a working proof of concept.

Rationale

The rationale is described in #2314.

Briefly, this PR implements local caching of image tiles so repeated WMTSRasterSource calls do not incur additional network traffic.

Implications

  • Reduced network usage for repeated calls.
  • Creation of files on disk in a temporary directory.
  • Ability to work offline and use WMTSRasterSource

Copy link
Contributor

@greglucas greglucas left a comment

Choose a reason for hiding this comment

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

Seems reasonable. There is a lot of duplicated code here between this and the other cache PR, so I am curious if there would be a good way to consolidate some of it into helper functions or class to be shared somehow. That can be a follow-up PR as well though if you don't want to expand the scope here.

lib/cartopy/io/ogc_clients.py Show resolved Hide resolved
lib/cartopy/io/ogc_clients.py Outdated Show resolved Hide resolved
lib/cartopy/io/ogc_clients.py Outdated Show resolved Hide resolved
lib/cartopy/io/ogc_clients.py Outdated Show resolved Hide resolved
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@dnowacki-usgs
Copy link
Author

Thanks for your feedback. Working on implementing these suggestions!

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.

None yet

3 participants