Doing merge/mosaic for batch request

I would like to “merge” or create a mosaic from multiple tiles generated from SH batch request API. Is it possible and if so what is the best way to do it?

Details:
Currently, I am creating a batch request for sentinel 1 VH data over a large area(500 sq. km) and storing resulting tiles into an S3 bucket. Afterward, I download these tiles on my local machine or an EC2 instance and do a rasterio.merge.merge operation to create a single mosaic of these tiles and store it on an S3 bucket as a separate file. Because it is much easier for post-processing and avoid any errors during masking and clipping.

I was wondering if there is a way to do this merge as part of the batch request so I don’t have to download 100s of files and delete them later.

Thank you in advance

We do not have such function yet supported as a standard Batch option as there are too many variations, depending on the size, CRS, etc. And the work-around is pretty simple, essentially a few lines of GDAL commands, as you have probably figured out yourself.

We did some code snippets doing that, if they might get handy for you:

1 Like

Thanks, Grega, this is perfect. I can replicate a python equivalent :smiley:

Hi, was wondering if this had been implemented yet?

Hello @arsalan.harris,

Yes it is possible to stitch all the tiles together and a tutorial can be found in our Sentinel Hub Webinar: Batch Processing API. You can find the relevant files linked in the description of this video. Hope this helps!