I am new to GDAL in Python (and Python in general), so as a way to begin learning, I am trying to perform basic functions such as getting extents from a single raster and printing them out.
However, I'm having some issues opening a file using
gdal.Open. I believe I have the syntax correct, and Visual Studio Code does not throw any errors, but I am not able to print out the desired information.
import os from osgeo import gdal file = "tile1.tif" ds = gdal.Open(file) ulx, xres, xskew, uly, yskew, yres = ds.GetGeoTransform() lrx = ulx + (ds.RasterXSize * xres) lry = uly + (ds.RasterYSize * yres) print (lrx ',' lry)