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

filenames are duplicated when composite_function=NULL #90

Closed
h-a-graham opened this issue Jan 21, 2025 · 4 comments
Closed

filenames are duplicated when composite_function=NULL #90

h-a-graham opened this issue Jan 21, 2025 · 4 comments
Labels
bug an unexpected problem or unintended behavior

Comments

@h-a-graham
Copy link
Contributor

Please briefly describe your problem and what output you expect:

When composite = NULL filenames are duplicated. I would expect unique filenames.

I think what's happening here is duplication rather than overwriting any data...

I'll take a closer look asap. 👍

aoi <- sf::st_point(c(-74.912131, 44.080410))
aoi <- sf::st_set_crs(sf::st_sfc(aoi), 4326)
aoi <- sf::st_buffer(sf::st_transform(aoi, 3857), 100)

out <- rsi::get_sentinel2_imagery(
  aoi,
  "2022-06-01",
  "2022-06-30",
  output_filename = tempfile(fileext = ".tif"),
  mask_function = rsi::sentinel2_mask_function,
  composite_function = NULL
)

print(out)
#>  [1] "/tmp/RtmpjBc47p/fileb4cb845f6d1c1_2022-06-29T154821.024000Z.tif"
#>  [2] "/tmp/RtmpjBc47p/fileb4cb845f6d1c1_2022-06-29T154821.024000Z.tif"
#>  [3] "/tmp/RtmpjBc47p/fileb4cb845f6d1c1_2022-06-24T154819.024000Z.tif"
#>  [4] "/tmp/RtmpjBc47p/fileb4cb845f6d1c1_2022-06-24T154819.024000Z.tif"
#>  [5] "/tmp/RtmpjBc47p/fileb4cb845f6d1c1_2022-06-19T154821.024000Z.tif"
#>  [6] "/tmp/RtmpjBc47p/fileb4cb845f6d1c1_2022-06-19T154821.024000Z.tif"
#>  [7] "/tmp/RtmpjBc47p/fileb4cb845f6d1c1_2022-06-14T154819.024000Z.tif"
#>  [8] "/tmp/RtmpjBc47p/fileb4cb845f6d1c1_2022-06-14T154819.024000Z.tif"
#>  [9] "/tmp/RtmpjBc47p/fileb4cb845f6d1c1_2022-06-09T154821.024000Z.tif"
#> [10] "/tmp/RtmpjBc47p/fileb4cb845f6d1c1_2022-06-09T154821.024000Z.tif"
#> [11] "/tmp/RtmpjBc47p/fileb4cb845f6d1c1_2022-06-04T154809.024000Z.tif"
#> [12] "/tmp/RtmpjBc47p/fileb4cb845f6d1c1_2022-06-04T154809.024000Z.tif"
duplicated(out)
#>  [1] FALSE  TRUE FALSE  TRUE FALSE  TRUE FALSE  TRUE FALSE  TRUE FALSE  TRUE

Created on 2025-01-21 with reprex v2.1.1

@h-a-graham h-a-graham added the bug an unexpected problem or unintended behavior label Jan 21, 2025
@h-a-graham
Copy link
Contributor Author

should be fixed with: ffe5b0e

@h-a-graham
Copy link
Contributor Author

oh... looks like it is related to this: microsoft/PlanetaryComputer#275
I presume the duplicates have been removed but the time stamps are still duplicated across distinct assets!.

@mikemahoney218
Copy link
Collaborator

Fixed by #89

Copy link

github-actions bot commented Feb 5, 2025

This issue 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 Feb 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants