There is a function in R ([trim][1]) which removes the NODATA situated in the outer rim of a raster (entire external row or column made of nodata). It is realy simple but quite slow. I am looking for a similar function or algorithm in gdal to do that. Any idea? [1]: https://www.rdocumentation.org/packages/raster/versions/2.5-8/topics/trim