sentinel-hub/custom-scripts

Question about data fusion

barbierimauro opened this issue · 3 comments

Hi all, I would like to use different datasets for doing some partical detection, specifically I want to use data from Sentinel-1 and Sentinel-2.
I am using this script as guidance https://github.com/sentinel-hub/custom-scripts/blob/master/data-fusion/ship_detection_s1_s2/script.js
however I am stuck at its execution because of an incomprensible error for me, that is the following:

Failed to evaluate script!
evalscript.js:20: TypeError: Cannot read property 'B03' of undefined
let ndwi = (S2L1C.B03 - S2L1C.B08) / (S2L1C.B03 + S2L1C.B08)
^
TypeError: Cannot read property 'B03' of undefined
at evaluatePixel (evalscript.js:20:19)
at executeForMultipleSources (:17:17)

I try different broswers but the results is exactly the same. What I am doing wrong ?

Hi,

Did you make sure to set the two datasets in EO Browser? Because it is datafusion, you need to set the two sources as inputs (for more info - check the ship detection script).

I would need more details about your script and process to help (maybe you can share an EOB link?).

Hi,
my bad!!! I was using exactly the original script without any modifications, but what I was doing wrong was the proper setup of the 2 datasets (I was putting first S1 and second S2), many thanks for helping me on this issue.
At the same time could I ask if you can indicate me a link/document, in which I could find all the "API" for EOscripts? thanks in advance!