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

feat: use regex to select band in StacAssets #38

Merged
merged 2 commits into from
Nov 14, 2023
Merged

Conversation

sbrunato
Copy link
Collaborator

Allows regex in band selection through StacAssets driver.
Mechanism:

  1. returns asset if only one key matches re.compile(rf"^{band}$", re.IGNORECASE)
  2. if previous doesn't return one asset, returns asset if only one key matches re.compile(rf"^.*{band}.*$", re.IGNORECASE)
  3. if previous doesn't return one asset, raises AddressNotFound

Closes #31

@sbrunato sbrunato linked an issue Nov 14, 2023 that may be closed by this pull request
@sbrunato sbrunato merged commit 4ee07f0 into develop Nov 14, 2023
4 checks passed
@sbrunato sbrunato deleted the stac-assets-regex branch November 14, 2023 16:34
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.

standardize band identification mechanism
1 participant