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

Only name output bands if it won't error #42

Merged
merged 4 commits into from
Feb 23, 2024
Merged

Conversation

mikemahoney218
Copy link
Collaborator

This isn't a complete PR, because this needs testing and I'm not sure if this should trigger a warning. But this change means that get_stac_data() can download data that's stored as a multi-band file without erroring on this step. Maybe the actual fix is in get_stac_data() and we don't pass band_names here?

For instance, this change lets you download NAIP:

rsi::get_stac_data(
  aoi,
  start_date = "2019-01-01",
  end_date = "2022-12-31",
  output_filename = "dubuar_naip.tif",
  asset_names = c("image"),
  stac_source = "https://planetarycomputer.microsoft.com/api/stac/v1",
  collection = "naip",
  sign_function = rsi::sign_planetary_computer,
  pixel_x_size = 1,
  pixel_y_size = 1
)

@mikemahoney218 mikemahoney218 marked this pull request as draft February 23, 2024 19:19
@mikemahoney218 mikemahoney218 marked this pull request as ready for review February 23, 2024 21:01
@mikemahoney218 mikemahoney218 merged commit d08d73f into main Feb 23, 2024
10 checks passed
@mikemahoney218 mikemahoney218 deleted the careful_naming branch February 23, 2024 21:29
Copy link

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant