Mosaic - How to set bound automatically in gpt processing

Hi, I have a problem with Mosaic. I want to use Mosaic in gpt mode to make a mosaic of lots of tiles. My problem is I have to set bounds (west, north, south, east), but I do not know bounds when I am automatically processing tilles in gpt mode. When I use GUI mosaic tool, it automatically loads bounds based on loaded layers.

If I set bigger bound to be sure it falls inside the bounds, it creates output as big as set bound even if layers are a lot smaller and the ouput is also wrong. If I put bounds parameters out of xml process is not working.

I have no clue how to solve this problem. Is it even possible to use mosaic in automatic gpt processing ? I need to put tilles back together after I splitted it for water detection. Multi-mosaic also need bounds. Radar mosaic is not working with binarized layers. Is there solution or I just have to work with my 100 tiles and there is no way to put it automatically together with gpt.

(I use S1 for detection, tillewriter/calibration/speckle filtering/bandmaths/terrain correction/mosaic)

In general one knows the region he wants to mosaic. In your case, you want to simply stitch the tiles together. Automatic computation of the bounds is is currently not possible with the mosaic operator on the command line. I’ve noted this as an improvement.
You could try the binning instead of the mosaic. The binning computes the mosaic automatically.

I wonder why you have split the scenes into tiles for the water detection?

Thanks for your respons. I use just simple thresholding method and It is easier on small parts of image because If I use whole image, water pixels are just very small part of all pixels and it is not in the histogram as two maxima.