Split product into tiles by pixel region

The attached graph shall show how to create equally sized tiles out of one product.

It assumes that the product has a known size and if applied to multiple products that all have the same size. if this does not applies the products need to be made equal. For this purpose the Resampling can be used. How to do this is not part of this graph description. Obviously it can happen that at the border the size can not be equal anymore. In this case you need to adapt the pixel region accordingly.
This graph can be called like this:

gpt "G:\EOData\graphXML\SplitProductInTilesGraph.xml" -PsourceFile="G:\EOData\temp\subset_of_S2A_MSIL2A_20170830T110621_N0205_.dim" -PtargetbasePath="G:\EOData\temp\output\subset_of_S2A_MSIL2A_20170830T110621_N0205"

This example call can also be found in the header of the xml file.

The concrete example assumes that the source has a size of 500x500 pixels and splits it into 4 equally sized tiles with a size of 250x250 pixels. For each target tile a subset is created with the specific pixel coordinates and a write node writes the result into a GeoTIFF file. Depending on your needs you need to adapt the pixel coordinates in the xml file and also add more couples of subset/write nodes.

SplitProductInTilesGraph.xml (2.3 KB)