GDAL function to split a large image into specific chunks

I would like to use GDAL, if possible, split the 3Gb image into 100mb TIF so that I can handle these smaller chunks. After processing, I would like to restore these images (which will look different) back to their original positions in order to create one large TIF again. It seems that I can use ImageMagick to do this, but I would like to stick with GDAL if possible.

So what functions would I use in GDAL to split and then rebuild chunks? retile.py? polygonize.py?

+3


source to share


1 answer


You can split the image into chunks / tiles with gdal2tiles

. You can also split it into parts depending on the number of pixels for each fragment, using gdal_translate

with the option -srcwin

. However, this will require you to write a bash / batch script to loop through your 30 image chunks.



If your processing does not change pixel size or spatial position, the easiest way to tiling is to use them gdal_merge

.

+2


source







All Articles