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

Inconsistent S3 URI paths for Sentinel-2 L2A JP2 files: Missing GSD subdirectories in STAC Item assets #57

Open
wakame1367 opened this issue Dec 27, 2024 · 0 comments

Comments

@wakame1367
Copy link

wakame1367 commented Dec 27, 2024

Issue Description

The S3 URIs in the STAC Item assets for Sentinel-2 L2A JP2 files are incorrect. They do not reflect the actual directory structure in the S3 bucket, which organizes files by GSD (Ground Sample Distance) in R10m, R20m, and R60m subdirectories.

Example

Using the STAC Item:
https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_21JXN_20240919_0_L2A

The "visual-jp2" asset has the href:
s3://sentinel-s2-l2a/tiles/21/J/XN/2024/9/19/0/TCI.jp2

When attempting to download using AWS CLI:

aws s3 cp "s3://sentinel-s2-l2a/tiles/21/J/XN/2024/9/19/0/TCI.jp2" ./TCI.jp2

fatal error: An error occurred (404) when calling the HeadObject operation: Key "tiles/21/J/XN/2024/9/19/0/TCI.jp2" does not exist

Actual S3 Bucket Structure

Listing the bucket contents shows GSD-specific subdirectories:

aws s3 ls "s3://sentinel-s2-l2a/tiles/21/J/UL/2024/11/1/0/"
                           PRE R10m/
                           PRE R20m/
                           PRE R60m/
                           PRE auxiliary/
                           PRE qi/
2024-11-02 04:11:23     547805 metadata.xml
2024-11-02 04:11:25       1038 productInfo.json
2024-11-02 04:11:23       1491 tileInfo.json

The JP2 files are stored in their respective resolution directories (R10m, R20m, R60m), but this structure is not reflected in the STAC Item asset hrefs.

Expected Behavior

The S3 URIs in the STAC Item assets should include the appropriate resolution directory in the path.

Questions

  1. Is this directory structure difference between the STAC Item hrefs and actual S3 bucket layout intentional?
  2. If intentional, where is this documented?
  3. Would it be possible to update the STAC Item asset hrefs to reflect the actual S3 bucket structure?
@wakame1367 wakame1367 changed the title Incorrect S3 URI paths in STAC Item assets for Sentinel-2 L2A JP2 files Inconsistent S3 URI paths for Sentinel-2 L2A JP2 files: Missing GSD subdirectories in STAC Item assets Dec 27, 2024
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

No branches or pull requests

1 participant