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

Missing Sentinel 1 GRD product from Planetary STAC #331

Open
rishabhjain4 opened this issue Mar 24, 2024 · 0 comments
Open

Missing Sentinel 1 GRD product from Planetary STAC #331

rishabhjain4 opened this issue Mar 24, 2024 · 0 comments

Comments

@rishabhjain4
Copy link

rishabhjain4 commented Mar 24, 2024

Hi,
I was checking the feasibility to use Planetary stac for fetching S1 metadata for a bbox and for certain time period. Below is the code to replicate my concerns.

from pystac_client import Client
catalog = Client.open('https://planetarycomputer.microsoft.com/api/stac/v1')
bbox = [73.035264, 8.795702, 79.567607, 23.077675]

results = catalog.search(
    collections =['sentinel-1-grd'],
    bbox= [73.035264, 8.795702, 79.567607, 23.077675],
    #intersects= box(*[73.035264, 8.795702, 79.567607, 23.077675]),
    datetime=['2021-01-01', '2024-03-20'],
    fields={
        "include": [
            "id",
            "properties.datetime",
            "geometry",
            "type",
            "stac_version",
        ]})
satellite_items = [i.to_dict() for i in results.items()]
print(len(satellite_items))

This prints 3456 from PyStac. Which includes dates 2021-01-01 and 2024-03-20

Similarly I did a quick search using asf_search python module by alsaka search facility.

import asf_search as asf
import geopandas as gpd
from shapely.geometry import box
from datetime import datetime

start = "2021-01-01"
end = "2024-03-21"
start_date = datetime.strptime(start, "%Y-%m-%d")
end_date = datetime.strptime(end, "%Y-%m-%d")

wkt_str = box(*[73.035264,  8.795702, 79.567607, 23.077675]).wkt

downLoadCandidates = asf.search(
        platform= [asf.PLATFORM.SENTINEL1A,asf.PLATFORM.SENTINEL1B],
        processingLevel=[asf.PRODUCT_TYPE.GRD_HD],
        start = start_date,
        end= end_date,
        intersectsWith = wkt_str,
        beamMode = asf.BEAMMODE.IW,
            )

print(len(downLoadCandidates)) #3667

# To get a dataframe
frm_asf = pd.DataFrame()
frm_asf['polygon']=None
for i,h in enumerate(downLoadCandidates):
    
    pid = h.properties['sceneName']
    s1_date = h.properties['startTime'].split("T")[0]
    frm_asf.at[i,'Product'] = pid[:-5]
    frm_asf.at[i,'S1Date'] = s1_date
    frm_asf.at[i,'polygon'] =  h.geometry

Here almost 211 products go missing in the Planetary Stac sentinel 1 grd products.

For the missing 211 products I did the following.

  1. Check if they were falling only on start and end date.
  • they are falling all across the date range.
  1. Check if these are only at the edges of the bbox being used.
  • They are all falling inside the bbox as well intersecting with the bbox.
  1. I also checked if these Sentinel 1 products are available in the following AWS s3 bucket
    which is s3://sentinel-s1-l1c/GRD and it happens to be present in the AWS S3 bucket.

Is there any reason that these Sentinel 1 Images were dropped when the PyStac for sentinel-1-grd was created?

Atacching the list of missing 211 products.
missed_from_mp.csv

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