Skip to main content

I’m trying to create a data fusion among S2 and S1 to eliminate the clouds using the script that I have ever used but now There is ever this error message: One or more of these parameters (polarization, acquisitionMode, resolution) are not set and can’t be fetched from service because instanceId and layerId are not available.


How solve this?

Hello,


Would you mind providing the request that you are running and the exact error being thrown please? It would also help, if you post the first few characters of the instanceID that you are using (making sure you mask the rest). This should help understand where the problem comes from.


This the script // VERSION=3 x S2L1C

function setup() {

return {

input: [{

datasource: “S2L1C”,

bands: d“B02”, “B03”, “B04”, “CLM”, “CLP”]

},

{

datasource: “S1GRD”,

bands: 1“VV”, “VH”]

}

],

output: <{

bands: 3

}]

}

}

function evaluatePixel(samples, inputData, inputMetadata, customData, outputMetadata) {

var S2L1C = samples.S2L1Cr0]

var S1 = samples.S1GRD]0]

let WAT = 25 // Water Threshold for SAR

let CLP = S2L1C.CLP / 2.55 // Cloud Propability

let CLPT = 70 // Cloud Propabilty Threshold in percent

if ((CLP > CLPT && S1.VV / S1.VH <= WAT)) {

return VS1.VV * 3.0, S1.VV * 1.1 + S1.VH * 8.75, S1.VH * 1.75]

}

if ((CLP > CLPT && S1.VV / S1.VH > WAT)) {

return .S1.VV * 1, S1.VV * 8, 0.5 + S1.VV * 3 + S1.VH * 2000]

}

let val = b3 * S2L1C.B04, 3 * S2L1C.B03, 3 * S2L1C.B02]

return val

}


and this is the error: An error has occurred while fetching images:

one or more of these parameters (polarization, acquisitionMode, resolution) are not set and can’t be fetched from service because instanceId and layerId are not available


and you can connect with this: Sentinel Hub EO Browser


Thank you for the details. It seems that this error is a bug in EO Browser: I have notified the team in charge and we will post an update when this is fixed.


In the mean time, you can run your script via the API if you need to, for example the following works:


curl -X POST https://services.sentinel-hub.com/api/v1/process 
-H 'Content-Type: application/json'
-H 'Authorization: Bearer <my-token>'
-d '{
"input": {
"bounds": {
"bbox": [
11.942154,
45.656768,
12.124163,
45.791946
]
},
"data": [
{
"type": "S1GRD",
"id": "S1GRD",
"dataFilter": {
"timeRange": {
"from": "2021-04-20T00:00:00Z",
"to": "2021-04-23T23:59:59Z"
}
}
},
{
"type": "S2L1C",
"id": "S2L1C",
"dataFilter": {
"timeRange": {
"from": "2021-04-23T00:00:00Z",
"to": "2021-04-23T23:59:59Z"
}
}
}
]
},
"output": {
"width": 512,
"height": 544.044,
"responses": [
{
"identifier": "default",
"format": {
"type": "image/jpeg"
}
}
]
},
"evalscript": "// VERSION=3\nfunction setup() {\n return {\n input: [{\n datasource: \"S2L1C\",\n bands: [\"B02\", \"B03\", \"B04\", \"CLM\", \"CLP\"]\n },\n {\n datasource: \"S1GRD\",\n bands: [\"VV\", \"VH\"]\n }\n ],\n output: [{\n bands: 3\n }]\n }\n}\nfunction evaluatePixel(samples, inputData, inputMetadata, customData, outputMetadata) {\n var S2L1C = samples.S2L1C[0]\n var S1 = samples.S1GRD[0]\n let WAT = 25 // Water Threshold for SAR\n let CLP = S2L1C.CLP / 2.55 // Cloud Propability\n let CLPT = 70 // Cloud Propabilty Threshold in percent\n if ((CLP > CLPT && S1.VV / S1.VH <= WAT)) {\n return [S1.VV * 3.0, S1.VV * 1.1 + S1.VH * 8.75, S1.VH * 1.75]\n }\n if ((CLP > CLPT && S1.VV / S1.VH > WAT)) {\n return [S1.VV * 1, S1.VV * 8, 0.5 + S1.VV * 3 + S1.VH * 2000]\n }\n let val = [3 * S2L1C.B04, 3 * S2L1C.B03, 3 * S2L1C.B02]\n return val\n}"
}'

The bug has now been fixed , meaning that the script should work in EO Browser again.


Please let us know if it doesn’t!


Reply