Element84 / earth-search

Earth Search information and issue tracking
https://earth-search.aws.element84.com/v1
26 stars 2 forks source link

URIs for S2-l2A JP2Ks Incorrect #33

Open duncankinnear-selectcarbon opened 3 months ago

duncankinnear-selectcarbon commented 3 months ago

When trying to access to L2A .jp2 assets, i'm receiving this error: CPLE_AWSObjectNotFoundError: The specified key does not exist.

I believe the URIs associated with those assets are incorrect i.e.: s3://sentinel-s2-l2a/tiles/51/U/YS/2024/3/21/0/B03.jp2 instead of: s3://sentinel-s2-l2a/tiles/51/U/YS/2024/3/21/0/R20m/B03.jp2

I'm working around this by updating the href of each item and asset, similar to this issue.

Example:

for i in range(len(items)):
   for a in items[i].assets:
      if items[i].assets[a].href.endswith(".jp2"):
        band_name = items[i].assets[a].href.split("/")[-1]
        items[i].assets[a].href = items[i].assets[a].href.replace(band_name, 'R20m/'+band_name)
matthewhanson commented 3 months ago

hello @duncankinnear-selectcarbon,

There does seem to be a problem with the URLs here, and at this point we will not be fixing that older collection of JP2K (review the README and mailing list archive links in this repo if you haven't already).

Is there a specific reason why you are using the JP2K files over the COG versions in the sentinel-2-c1-l2a collection in the Earth Search API?