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

fix: copy the metadata of the ImageCollection when copying an asset #388

Merged
merged 1 commit into from
Nov 30, 2024

Conversation

12rambau
Copy link
Member

Fix #371

It was much more complicated than I though.
Setting the system:time_start of the ImageCollection is forcing me to jump in 3 differnet naming convention:

  • startTime in the getAsset method
  • start_time in the updateAsset method
  • system:time_start (still camel case but reversed) in ee.imageCollection.propertynames

In this PR I upgraded the setProperties so it supports all type of properties (system and normal) and tay consistent with the server API convention (system:time_start).
I then added extra steps in the copy method to retreive startTime from the original asset and pass it in the correct format.

I also reported my findings on the Google issue tracker: https://issuetracker.google.com/issues/381535044

Copy link

codecov bot commented Nov 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.21%. Comparing base (39054f7) to head (7eb8000).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #388      +/-   ##
==========================================
- Coverage   89.76%   89.21%   -0.55%     
==========================================
  Files          27       27              
  Lines        1739     1753      +14     
  Branches       87       92       +5     
==========================================
+ Hits         1561     1564       +3     
- Misses        151      160       +9     
- Partials       27       29       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@12rambau 12rambau merged commit 9a5dab3 into main Nov 30, 2024
10 of 11 checks passed
@12rambau 12rambau deleted the cp-mv branch November 30, 2024 09:38
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.

moving/copying an ImageCollection is not preserving it's metadata
1 participant