I'm using gdal lib for Python in a Jupyter Notebook environment.
I'd like to retrieve the resolution of a raster to use it in a gdal.warp call.
At the moment I do the following :
src = gdal.Open(mask)
ulx, xres, xskew, uly, yskew, yres = src.GetGeoTransform()
but I get too much information. Is there a way to only retreive xres and yres?
xres, yres = src.GetGeoTransform()[1:6:4]– user2856 Jul 17 '20 at 10:06