Oil Spill Graph - Detection/Cluster Output Looks Wrong

I have processed the oil spill, but the statistic display min = 1 and max =1.
could you explain it? thankyou

the mask consists of 1 and NaNs.
1 is oil, all otheres are no-oil.

You can open the band properties and uncheck the “use no data value” checkbox. This will give you the image composed of 0 and 1.

ok thanyou, after that, is the next step? Whether the step is final step for detect oil spill area? thankyou

you next step depends on what you want to do with the data.
You could filter it to change smaller miscalssifications.
Is it already geocoded?

yes, i want to change smaller misclassifications. But i have not geocoded, because i dont have reference to do it in SNAP. could you share reference about it?

  1. Test various filters by right-clicking on the corresponding band and select ‘filter band’.
    This creates virtual layers. They are stored by the logical expression of the filter only, that means that they are not written on your hard drive but only exist ‘on-the-fly’.

  2. If you found some good result, right-click > convert band and save the product to make it a permanent raster.

  3. Geocoding of ocean surfaces can be done with Radar > Geometric > Ellipsoid correction. Usually you take the Terrain correction modules for SAR data but as you are over flat areas on the ocean, topographic effects do not play a role. Just make sure that you include your desired bands and don’t mask out sea areas (as suggested by the Terrain correction module).

thankyou, and i want to ask, how about the characteristic of oil spill. Like a value of median, sigma, mean, etc. whether there is a limit value, so it’s called oil spill. thankyou

please have a look at this fantastic page:

Collection of anything you want to know about ocean applications with SAR data.


i’m sorry, i want to ask, when i read jurnal from D.Mera about adaptive thresholding algorithm based on SAR images and wind data, i found coefficients and cutoff points, in the function there was “x”. Did you know what the x? thank you

Hello there! and thanks for the good suggestions. But I didn t really understood the connection wind-threshold. If the wind is to low i.e. everything looks like a slick shoud we reduce or increase the shift?
thanks in advance


We reduced the backscatter threshold shift for low wind conditions - as slicks and calm water will be very similar you need to search for a smaller difference in backscatter from the already low water return. At higher winds you will see more of a drop in backscatter from oil and so it is easier to find slicks. We adapted some windspeed thresholds from the Brekka and Solberg paper (which they also adapted from older papers) and changed the values accordingly.

1 Like

Thank you =) !

Hello There =)
I am back again with a new question for oil spill.
actually you can set the minimum size of the cluster in order to delete smaller one. But if I am not wrong (probably i am )… is this the number of all the pixels belonging to all the different poligons found by the algorithm as oilspill?
why setting this treshold should be useful?
won t be better to have a threshold on the size of a single polygon rather than the cluster?

@ABraun @con20or

to my opinion, the minimum cluster size refers to pixels which are connected. This allows you to exclude many very small areas.

Cluster in this case refers to separable areas of pixels. The term polygons is more related to vector areas.

Hello Abraun,
in this screenshot it says that the clusters will be deleted based on 2 thing:

  • elimination based on the cluster dimension
  • elimination based on the minimum cluster size
    Can you explain what s the difference?
    can you show me where i can find these 2 parameters because i can only find one (MINIMUM CLUSTER SIZE) in the Oil-Spill-clustering Tab.

    in which of the 2 categories before mentioned will you put it?
    According to my opinion which has been built on some results that i got, the “MINIMUM CLUSTER SIZE” parameter is related to the total area that you get adding all the pixels found by the algorithm.

The default value is 0.1 Sq km which is 100.000 sq m which divided by 100 sq m (let’s set this value as the dimension of one pixel) makes 1000 pixels. According to what i ve read on the help and what you said with the previous post all the groups of contiguous pixels that have a smaller number of pixels should be deleted. Actually analysing my data… i can see that’s not like that. I have groups of pixels (which abraun and the help says i should could CLUSTER) with a number that is smaller than 1000 pixels.

That’s why i keep thinking that there is no parameter related to the size of the single group of contigous pixels.
Am I right or not? Thanks for your help.

info for replicating:
S1 S1A_IW_GRDH_1SDV_20170102T063506_20170102T063531_014649_017D2D_D901
shoreline: 10 pixels
background window: 21
threshold shift: 1.5
MINIMUM Cluster Size: 0.1

to be honest, I don’t know the tool well enough to be able to answer this. Maybe one of the developers can clarify.

Halo sir, I still confuse about thresholding shift, why the change in backscatter at the transition from oil to water help us to defining the Threshold?
I have tried using different Threshold while another parameter value is same, but when i use smaller Threshold, there is more backscatter detected as oil spill. If value lower than Threshold is detected as dark spot, i still think greater Threshold Will detect more dark spot then smaller Threshold. Still confuse about that. Can you please explain us about that? Thank you

this is always a problem when you are using global thresholds (one value for large areas). You can do the following

  • define thresholds on both VV und VH and combine them (e.g. in the mask manager9
  • stronger filtering before thresholding
  • minimum or maximum filter after thresholding to remove smaller pixel clumps

Please I want to detect the oil spill with SNAP using GPT, or Python Code.
Some one can help me with the good Code?

Here several helpful resources are collected: