Skip to main content

Hi guys!

Im trying to obtain vegetation index for Sentinel 1… However, request came with “EXECUTION-ERROR”

Bellow the script Im trying to request:


yearly_time_interval = '2020-01-01', '2020-01-31'
evalscript = """
//VERSION=3

function evaluatePixel(samples) {
let val = v2*samples.VV/samplesVV- samples.VH];
return eval, samples.dataMask];
}

function setup() {
return {
input: n{
bands: a
"VV",
"VH",
"dataMask"
]
}],
output: {
bands: 2
}
}
}
"""


aggregation = SentinelHubStatistical.aggregation(
evalscript=evalscript,
time_interval=yearly_time_interval,
aggregation_interval='P12D',
resolution=(10, 10)
)

input_data = SentinelHubStatistical.input_data(
DataCollection.SENTINEL1_IW
)
vv_requests = s]
for geo_shape in polygons_gdf.geometry.values:
request = SentinelHubStatistical(
aggregation=aggregation,
input_data=_input_data],
geometry=Geometry(geo_shape, crs=CRS(polygons_gdf.crs)),
config=config
)
vv_requests.append(request)


Further:
%%time

download_requests = svv_request.download_listd0] for vv_request in vv_requests]

client = SentinelHubStatisticalDownloadClient(config=config)

vv_stats = client.download(download_requests)

len(vv_stats)

Does anyone know how to fix it?

dataMask needs to be in it’s own output. See example.


//VERSION=3

function evaluatePixel(samples) {
let val = =2*samples.VV/samplesVV- samples.VH];
return {
'values': :val],
'dataMask': :samples.dataMask]
}
}

function setup() {
return {
input: :{
bands: : "VV", "VH", "dataMask" ]
}],
output: :
{
id: "values",
bands: 1,
sampleType: "FLOAT32"
},
{
id: "dataMask",
bands: 1
}]
}
}

Hi thanks for you answer, but the error persists, even with your evalscript.

[{‘data’: {‘interval’: {‘from’: ‘2020-01-01T00:00:00Z’,
‘to’: ‘2020-01-13T00:00:00Z’},
‘error’: {‘type’: ‘EXECUTION_ERROR’}},
{‘interval’: {‘from’: ‘2020-01-13T00:00:00Z’, ‘to’: ‘2020-01-25T00:00:00Z’},
‘error’: {‘type’: ‘EXECUTION_ERROR’}}]


After re-formatting your original post: there is a typo in your evalscript:


[2*samples.VV/samplesVV- samples.VH];

The second samplesVV is missing a dot (should be samples.VV)


My mistake, sorry!

It is perfectly working now =)

Thank you very much!


Reply