Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use _geotargets cache for files, _targets forPackedSpatRasters#106

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
Aariq wants to merge18 commits intomasterfromuse_cache

Conversation

@Aariq
Copy link
Collaborator

@AariqAariq commentedOct 22, 2024
edited
Loading

A slightly different take on#63 that uses an option (currently calleduse_cache) to switch on behavior to deal with#58 instead of adding an additionaltar_terra_*() function.

Whenuse_cache isTRUE, the raster is written withterra::wrapCache() tocache_dir (default_geotargets/) and the output (aPackedSpatRaster object) is saved to the targets store withsaveRDS(). This allows 'sidecar' files to exist and be read back in by the read function (terra::unwrap(readRDS(path))).

I'd love any feedback onnaming things andwhere to document this. E.g. I'm not sure that "cache" is really a good/complete descriptor for what's going on here.use_external_cache?use_raster_cache?use_proxy_cache?

Things to do in other PRs before this one is ready:

Things to do in this PR before it is ready:

  • document()
  • Make sure management of the_geotargets/ cache is user-friendly. E.g. when that cache is destroyed (by ageotargets function), the corresponding targets are also invalidated.
  • possibly implement something liketar_prune() but for the_geotargets/ cache.
  • testing and/or documentation that this probably doesn't work with cloud storage

brownagand others added17 commitsApril 28, 2024 18:46
… metadata - Source data file is written using `terra::wrapCache()` to a user-specified cache directory - Target is created for PackedSpatRaster based on cache - Target is created for cache files - Add cache-managing functions `geotargets_destroy_cache()` and `geotargets_init_cache()`
Co-authored-by: Eric R. Scott <ericrscott@arizona.edu>
Co-authored-by: Eric R. Scott <ericrscott@arizona.edu>
@Aariq
Copy link
CollaboratorAuthor

Hmm... now questioning whether this is better than just using zip or tar files (optionally) like in#62. Might need to do some benchmarking to see how much overhead each method adds. If they are similar, then maybe zip/tar files (with low or no compression) are better since it doesn't involve managing a separate cache.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@Aariq@brownag

[8]ページ先頭

©2009-2025 Movatter.jp