Dear List,

I'm updating the RasterBender plugin and need to use the gdalwarp and
gdal_translate command line tools from within Python. What is the
recommended way to run gdal command line tools from within a QGIS plugin ?

Here under Windows it works with :

subprocess.check_call(''C:\\OSGeo4W\\bin\\gdalwarp...

But obviously that won't work on other setups.

Surprisingly it works too with :

subprocess.check_call('gdalwarp...

Will this work on all setups ? I have no Mac to test on, and am not
completely aware of the differences between standalone installs and osgeo4w
installs..

I looked into the GdalTools plugin and the Processing plugin, but their
method to get the GdalTool seems excessively complex (the rely on some user
settings which don't seem to be set here, and/or do some voodoo about
environment variables which I don't really understand...).


Thanks !

Olivier
_______________________________________________
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to