Multi-temproal filter requires unit

Hi Everyone,

I’m applying the Multi-Temporal-Speckle-Filter to a set of subset of Sentinel-1 data. The subsets were derived using “gdalwarp.py” and “gdal_merg.py”, therefore no “unit” info were recorded in the metadata.

The error I received when running the gpt is:
[NodeId: Multi-Temporal-Speckle-Filter] band band_1 requires a unit

I can add the unit info in SNAP-GUI, through “Properties->Raster Band Properties->Unit”, which will be tedious considering there are multiple bands and multiple files.

So my question here is:
Is there a way to add band “Unit” info after stacking for existing GeoTiff files?

Thanks a lot.

gdalwarp and gdal_merge probably have lost the metadata information of your product. I therefore highly recommend sticking to the BEAM DIMAP format until the end. GeoTiffs cannot store SAR metadata which are required for many operations.

If you want to process images without the GUI you can use the graph processing tool of SNAP (gpt).

Thanks for the advice.

I want to apply speckle-filter to the subset image because it will be very slow for the whole tile, and for now we only need sampling based analysis. For example, we extract information from a set of 20x20m sampling blocks (75 blocks in total). Each block has a series of Sentinel-1 revisit (IW GRDH). My pre-processing chain is saved in the graph below:
VVVH_Rb_Orb_Cal_M2_TF_TC_SNAP20m.xml (5.8 KB)

Then I subset and stack back using gdalwarp and gdal_merge, which is seems more convenient for bash scripting compared to using SNAP via gpt.

There’s no problem when applying single-product filtering (e.g. Lee Sigma). I would like to apply the multi-temporal Lee Sigma filter because this http://forum.step.esa.int/t/single-or-multi-temporal-speckle-filter/2139 suggest to use it. I also did a quick run over one of the sampling block, and the results prove that Multi-temporal Lee Sigma Filter performed the best (see image below).

(left: Raw image, Gamma0_VV, power scaled; mid: single-product Lee Sigma filter; right: multi-temporal Lee Sigma filter).

However, the multi-temporal filter required this “Unit” info which lost during the process of subseting (via gdalwarp) and stacking (via gdal_merge.py). Above Multi-temporal filter result was derived by manually add “Unit” back for each band in stack.

Also I test to do “Subset” after “Apply-Orbit-File and Calibration”, but before other pre-processing (e.g. “Multilook”, “Terrain-Flattening”, and “Terrain-Correction”). I see there is an option to use “Geographic Coordinates”, and the test under SNAP/GUI works. But it seems there are some issues that the subset is not in square (from geojson to WKT using http://geojson.io/):

In sum, my questions are:

A) Can we add the metadata back for subset image stack, say from the pre-processed Gamma0 image? It seems using WKT to subset then I will need to use gdalwarp again to get a square output in my case.

B) If must do the within SNAP, is there an option to give input vector (shapefile/geojson) for “subset”? As mentioned above, I will need to apply this in a batch mode, using"gpt" via bash script.

Thanks!

Whenever I use the subset tool in batch mode in SNAP, I create a WKT with this page
https://arthur-e.github.io/Wicket/sandbox-gmaps3.html
and enter it in the module. You are right, you can only subset rectangular windows, but maybe this is an option to you.

The other thing is: You can use tha Land/Sea mask operator to use polygons as subsets.

I haven’t tried it in batch mode but I think it should work there as well.