[Qgis-developer] Shipping SAGA with QGIS

Phil Hess macpgmr at fastermac.net
Sun Feb 24 10:19:37 PST 2013


>>But I think it might use some non-GUI classes from wxWidgets, we should
check it 

Correct. saga_cmd and the SAGA libraries are linked against wxWidgets, just
as QGIS and its framework libraries are linked against Qt - there's no
getting away from wxWidgets with SAGA, just as there's no getting away from
Qt with QGIS.

I looked into why SEXTANTE's shelling to saga_cmd fails. For some reason,
the path that QGIS's Python environment sees does not include
/usr/local/bin, whereas a simple Python script like this does include it and
shelling works fine:

import os, subprocess
print os.environ['PATH']
subprocess.Popen("saga_cmd", shell=True)

I don't know why this path is different in QGIS than in Python launched from
a Terminal command line, but that's the fix: either add the full path to
saga_cmd or figure out a way to get the full environment path.

Thanks.

-Phil




--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Shipping-SAGA-with-QGIS-tp5036274p5036484.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.


More information about the Qgis-developer mailing list