Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@12rambau
Copy link
Member

everything is in the title THis was not working because number from GEE are always interpreted as floats:

ic = ee.ImageCollection(collection.as_posix())
collection.setProperties(**{
    "system:time_start": ic.aggregate_min("system:time_start").getInfo(),
    "system:time_end": ic.aggregate_max("system:time_start").getInfo(),
})

This PR should make sure the numbers are alwaysinterpreted as timestamps and transformed into str isoformated dates

@12rambau 12rambau requested a review from Copilot July 21, 2025 08:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a type handling issue where Google Earth Engine returns timestamp data as floats instead of integers, causing the setProperties method to fail when setting time properties. The fix ensures that both integer and float timestamp values are properly converted to ISO-formatted date strings.

  • Extends type annotation to accept float values for timestamp data
  • Updates timestamp conversion logic to handle both int and float types

@12rambau 12rambau merged commit ccf6c79 into main Jul 21, 2025
3 of 10 checks passed
@12rambau 12rambau deleted the float branch July 21, 2025 08:23
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.

1 participant