I am trying to get started with GDAL on a windows machine using Python2.7. I have tried commands such as:
gdalinfo RasterFileName.TIF and gdal_translate.py -projwin ulx uly lrx lry -of GTiff input.TIF output.TIF
and they run without producing any results. What am I missing that makes these not to work.
For example, I am doing the gdal_translate as follows:
import os
infile = path+'InFileName.TIF'
outfile = path+'OUTFileName.TIF'
string ='gdal_translate -projwin %.0f %.0f %.0f %.0f -of GTiff %s %s' %(ulx,uly,lrx,lry,infile,outfile)
os.system(string)
Many thanks
gdalinfo <some raster>
via the command line?import gdal gdal.VersionInfo()
in Python. For GDAL in the command line trygdalinfo --version
in the command line. What are you getting?import gdal
and then trygdal.VersionInfo()
with parentheses.