Accessing the new QGIS 3.0 processing scripts through the Python console is proving to be a challenge for me, especially since the old processing.alglist() and processing.alghelp() commands appear to be defunct.
- How does one call up a list of processing scripts?
- How does one call up the help info for an individual script?
Answer
How does one call up a list of processing scripts?
QgsApplication.processingRegistry().algorithms()
If you want to print a readable list of algorithm ids and names, you can do this:
for alg in QgsApplication.processingRegistry().algorithms():
print("{}:{} --> {}".format(alg.provider().name(), alg.name(), alg.displayName()))How does one call up the help info for an individual script?
processing.algorithmHelp("qgis:refactorfields")
See https://qgis.org/api/api_break.html#qgis_api_break_3_0_Processing for details and recommendations from QGIS developers.
No comments:
Post a Comment