Stack or Collocation

Thanks a lot for your detailed explanation.
Yes, i did make a stack with both methods.
In the radar stack tool i used the geolocation instead of orbit to allign the images and in both cases i used nearest neighour for resampling (which resampling do you think is the most proper one?)
Apparently they both seem to work properly and the only difference i can find is exactly about the names since collocation has a different naming rules.
This feature can be useful in case to run a pretrained classifier on different images for example from different times and avoid the different names’ problem.
In the stack method is not possible to find the be optimal master image because i got an error about “centroids” so i suppose it simply uses the loading images’ order.

1 Like

Thank you for reporting.

The resampling types depend a bit on what is needed. If you investigate fine features which might only be one or two pixels wide (e.g. roads), it is better to use nearest neighbor to preserve the characteristics of these pixels, because the others calculate averages based on different approaches.

Besides that, I think if both images are geocoded, there is no large difference, because none of the adjustments include rotation, stretching or resizing of the slave images. Accordingly, the different resampling types will largely be the same. They get more important when the spatial resolutions of the images differ strongly or the images are distorted.

Ok soon as i said that everything was working fine i just tried to stack with collocation S1 and S2 images, but this time i have an error:

error

Any idea about how to solve this?

I have never seen this error, maybe related to the metadata of S2. What file format did you select to process your images?

That’s a known issue. Unfortunately it exists already for quite some time.
https://senbox.atlassian.net/browse/SNAP-662
In your case @wincenzo, removing the trailing ‘_M’ from the valid-pixel expression should fix it.

2 Likes

What do you mean exactly?

Anyway i see this exception in the Arithmetic flag for the S2 file

But consider that in this S2 one i already merged some index rasters and the msavi2 index’s flag looks like this

This one seems very highly related to the issue in my other post: Not classified pixel

@marpet do i have to remove that “_M” in all rasters?

did you stick to the BEAM DIMAP format or select any other type, e.g. GeoTiff

yes just used the BEAM DIMAP format

Yes, Unfortunately. It is a shame.
But you can open the *.dim file in a text editor and do the change by search&replace.

OK, thanks for help, i’m going to check what to do.

@marpet i just solved by removing “_M” from the collocation rename master components setting

1 Like

Nice trick.

1 Like

We need to define a recommended workflow for S1/S2 collocation.

2 Likes

As per this tutorial, I collocated Sentinel 1 and Landsat 8 image. But after collocation, while opening any band, an error pops up.

How can I solve this?

coud you please show a screenshot of the band properties (right-click) of the opened band?

and in the “flags_S” band?

I am searching for the “flags_S.designated_fill_S” expression somewhere in the band properties which causes the error.

Maybe under collocationFlags?