Rename/delete bands from product using a GRAPH-file


Hi all,

what would be the recommended way to rename or delete one or several bands from a product from within a graph-file processed with the GPT?

Thanks a lot for any suggestions.


Or, even better, I would like to replace an existing band in a product with a result coming from a BandMath operation.



This is not so easy, or maybe it is.
Create the new band with the BandMath operator as usual.
As next step you use the Subset operator to create a product without the band to be replaced.
Afterwards you merge the both results.
I’ve attached an example graph which shows how it should work.

Unfortunately you have to name all bands in the subset step except the one you want to replace.
In future releases it will be possible to define excludes in Merge operator.

math_subset_merge.xml (1.4 KB)


Thanks! At the same time it seems that I also managed something similar using the BandSelect operator combined with a Merge. Nevertheless, it would be nice if future versions would indeed make life a bit simpler here :wink:



Is there a Rename function in Snap I can call with Python by any chance?
I need to rename a band labelled “band_1” to “B1” with Python. I can do it manually using the Snap software but I don’t find the Snap function I can call with Python.