Skip to content

[DRAFT] Update earthdaily to support Sentinel 2#446

Open
robmarkcole wants to merge 10 commits intoallenai:masterfrom
robmarkcole:update-eda-client
Open

[DRAFT] Update earthdaily to support Sentinel 2#446
robmarkcole wants to merge 10 commits intoallenai:masterfrom
robmarkcole:update-eda-client

Conversation

@robmarkcole
Copy link
Contributor

@robmarkcole robmarkcole commented Jan 23, 2026

Updated to 1.8 and support Sentinel 2

Question: some of the other datasources support credentials via the configuration, support that also? Auth requires:
export EDS_AUTH_URL, EDS_CLIENT_ID, EDS_SECRET, EDS_API_URL

CC @imanshafiei540

@robmarkcole robmarkcole changed the title [DRAFT] Update earthdaily dependency Update earthdaily to support Sentinel 2 Jan 23, 2026
@imanshafiei540
Copy link

@robmarkcole About the question:

If I understand it correctly, you want to pass the credentials directly to the EDSConfig instead of setting environment variables, am I right?

You should be able to do that already:

EDSConfig(
    client_id="EARTHDAILY_API_TOKEN",
    client_secret="SECRET_TOKEN",
    token_url="https://api.earthdaily.com/account_management/v1/authentication/api_tokens/exchange",
    base_url="https://api.earthdaily.com"
)

Let me know if the above works for you. Thanks!

@robmarkcole
Copy link
Contributor Author

Specifically the data config.json where some other data sources set e.g. api_key: XXX

@favyen2
Copy link
Collaborator

favyen2 commented Jan 23, 2026

Will take a closer look later but for the config, I think it is fine to require the environment variables to be set and not accept it via the config.json.

Are all of the Sentinel-2 scenes in the catalog processed with processing baseline 04.00 or higher (so don't need harmonization like https://developers.google.com/earth-engine/datasets/catalog/COPERNICUS_S2_SR_HARMONIZED)?

@robmarkcole
Copy link
Contributor Author

@favyen2 thanks for your comments! @imanshafiei540 to comment on the processing, thanks

@robmarkcole
Copy link
Contributor Author

robmarkcole commented Jan 28, 2026

@favyen2 sentinel-2-l2a does not have baseline 04.00 or higher. We do have sentinel-2-c1-l2a with baseline >= 5 but personally I have only used sentinel-2-l2a

@favyen2
Copy link
Collaborator

favyen2 commented Jan 30, 2026

@robmarkcole Given that there could be scenes with a lower processing baseline, should it include the harmonize: bool option to take care of adjusting scenes processed under the newer versions to look like those processed under the older versions in case the user is comparing across long time periods?

@robmarkcole
Copy link
Contributor Author

@favyen2 let me check with @imanshafiei540 if we can support this in the client, or if we should switch to sentinel-2-c1-l2a

@robmarkcole robmarkcole changed the title Update earthdaily to support Sentinel 2 [DRAFT] Update earthdaily to support Sentinel 2 Jan 30, 2026
@favyen2
Copy link
Collaborator

favyen2 commented Jan 30, 2026

Most of the other data sources use

def get_harmonize_callback(

@robmarkcole
Copy link
Contributor Author

Update: we will switch to the C1 collection and implement rescale support in the python client

- Enhanced EarthDailyItem to include optional asset_scale_offsets.
- Updated EarthDaily class to extract scale and offset metadata from STAC assets.
- Implemented scale/offset application in read_raster and ingest methods.
- Added unit tests to verify scale/offset functionality.
@robmarkcole
Copy link
Contributor Author

@imanshafiei540 we can consider how to utilise the functionality in 1.9 of the client and refactor this PR as there is a lot of duplication

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.

3 participants