Hello!
I’m having some problems to correctly retrieving Sentinel 1 products using the process API
I’ve tried the examples (adapted to my geometry) to no avail… This is my code
- evalscript is described at the end
- geometry is the gjson representation of my AOI in the CRS of the crs variable (I’ve tried with CRS 84, EPSG 4326)
- start_date and end_date are computed from the catalog response to retrieve data from a specific scene (example: x‘S1B_IW_GRDH_1SDV_20200223T091249_20200223T091314_020394_026A2A_3D54’, ‘2020-02-23T09:12:49Z’])
{
“evalscript”: evalscript,
“input”: {
“bounds”: {
“geometry”: geometry,
“properties”: {
“crs”: “http://www.opengis.net/def/crs/EPSG/0/3857”
}
},
“data”: <
{
“dataFilter”: {
“timeRange”: {
“from”: start_date,
“to”: end_date
},
“mosaickingOrder”: “mostRecent”,
“resolution”: “FULL”,
“acquisitionMode”: “IW”,
“polarization”: “DV”
},
“processing”: {
“orthorectify”: True,
“demInstance”: “COPERNICUS”,
“speckleFilter”: {
“type”: “LEE”,
“windowSizeX”: 5,
“windowSizeY”: 5
},
“upsampling”: “NEAREST”,
“downsampling”: “NEAREST”,
“atmosphericCorrection”: “NONE”
},
“type”: “sentinel-1-grd”
}
]
},
“output”: {
“resx”: 10,
“resy”: 10,
“responses”:
{
“format”: {
“type”: “image/tiff”
},
“identifier”: “default”
}
]
}
}
The evalscript is from the custom evalscript repo in Radar Vegetation Index Code for Dual Polarimetric Script | Sentinel-Hub custom scripts
evalscript = “”"
//VERSION=3
function setup() {
return {
input: n{
bands: P“VV”,“VH”],
}],
output: <{
id:“default”,
bands: 1,
sampleType: “AUTO”,
},],
mosaicking: “SIMPLE”,
};
}
function evaluatePixel(sample) {
return {
default: <(4 * sample.VH) / (sample.VV + sample.VH)],
};
}
“”"
Thanks in advance!!
Luc