[gdal-dev] Problems with Python/subprocess.call/gdalwarp

Sean Gillies sean at mapbox.com
Fri Jan 17 08:27:23 PST 2014


Arielle,

Try

     output = subprocess.check_output('gdalwarp ...')
     print output

to see what gdalwarp might be complaining about in the child process.

See also 
http://docs.python.org/2/library/subprocess.html#subprocess.check_output.


On 5/31/13, 10:36 AM, Arielle Simmons wrote:
> I am trying to use a subprocess.call method in python to use ‘gdalwarp’
> on a .img file. So far everything that I’ve put in my script runs
> fine…but the gdalwarp. There is no error…so I assume I am somehow not
> understanding the gdalwarp statement as well as I thought I might.
>
> Anybody see what I am missing (or can direct me to a strong reference
> regarding gdalwarp)?
>
> Enclosing full code in .txt.
>
>         subprocess.call('gdalwarp %s %s -t_srs "+proj=lcc
> +lat_1=42.68333333333333 +lat_2=41.71666666666667 +lat_0=41 +lon_0=-71.5
> +x_0=200000 +y_0=750000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"'
> %(raster, 'new_'+raster))
>
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>

-- 
Sean Gillies
sean at mapbox.com


More information about the gdal-dev mailing list