Feature request #5713
Make analysis commands callable from Python
|Pull Request or Patch supplied:||No||Resolution:||fixed/implemented|
|Easy fix?:||No||Copied to github as #:||15235|
This would allow them to be used from other applications, and more importantly from SEXTANTE, so they can be included in models, scripts etc.
#2 Updated by Nathan Woodrow almost 8 years ago
I'm not really sure that it is needed IMO as you can just use python and import qgis and use them like that.
As SEXTANTE is part of QGIS via the plugin system it can already use anything that is exposed to Python, which includes qgis.analysis. If SEXTANTE was ported to core (once stable) it will be able to use stuff that isn't exposed to Python.
Adding command line options for use with SEXTANTE doesn't make much sense as you would need to create a new instance of QGIS, do work, then close.
#4 Updated by Alexander Bruy almost 8 years ago
Paolo Cavallini wrote:
All methods should be therefore exposed through Python to be usable this way. Where can we find documentation on how to call these functions?
Some information can be found in API docs http://qgis.org/api/group__analysis.html, http://qgis.org/api/classQgsZonalStatistics.html and http://qgis.org/api/group__networkanalysis.html. For network analysis there is also description and examples in CookBook http://www.qgis.org/pyqgis-cookbook/network-analysis.html