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? – Jay Laura Oct 28 '13 at 17:57import gdal gdal.VersionInfo()in Python. For GDAL in the command line trygdalinfo --versionin the command line. What are you getting? – ustroetz Oct 28 '13 at 18:09import gdaland then trygdal.VersionInfo()with parentheses. – ustroetz Oct 28 '13 at 18:19