I have a fairly complex Python program that needs to use a single command of GDAL. Currently I'm using os.popen
to call the command gdalwarp
from Python. This works, but is an ugly approach, so I'd prefer to use GDAL from within the Python program. However I'm a bit overwhelmed by the documentation and I have found no simple example I can use to tackle my problem.
The command I'm using is something like:
gdalwarp -overwrite -co compress=none -of Gtiff -t_srs EPSG:4326 -te -180.02250000 -90.02250000 179.97750000 90.02250000 -tr 0.045 0.045 *.tiff output.tiff
How can I reproduce the behaviour of this command with Python calls to the GDAL library?