[QGIS-Developer] How to call a custom algorithm provider in stand alone application with pyqgis

PALMIER Patrick (Responsable de groupe) - CEREMA/DTerNP/DATHa/MT Patrick.Palmier at cerema.fr
Mon Nov 2 08:23:23 PST 2020


Hello,

I work with Qgis 3.14 in Windows 10

I try to call a processing algorithm from a python stand alone app,
I want to run the following script from the custom Networks algorithm 
provider but I have the message that the algorithm is not known

How to register the provider in the processing registry to be able to 
call it?


     QgsApplication.setPrefixPath("C:/Program Files/QGIS 
3.14/apps/qgis", True)
     qgs = QgsApplication([], False)

     qgs.initQgis()
     import processing
     from processing.core.Processing import Processing
     Processing.initialize()



     processing.run("Networks:musliw_simple_matrix", 
{'NODES':'G:/BD_DREAL/2020/script_modele_resmultimodal_light 
/noeuds_light_hdf_be.gpkg','NUM':'num','START_POINT':'708675.425564,7063676.157556 
[EPSG:2154]','END_POINT':'708675.425564,7063676.157556 
[EPSG:2154]','DEMAND':1,'DAY':1,'TIME':'09:00:00','DEPARTURE':1,'OUTPUT':'G:/BD_DREAL/2020/script_modele_resmultimodal_light/matrice.txt','WRITE_MODE':0})

Thanks

Best regards


-- 

*Patrick Palmier *
*Responsable du groupe Mobilités et Territoires
DATHa / MT *
*Tél.: +33(0)3 20 49 60 70- Port : +33(0)7 77 34 25 07 *


Cerema Nord-Picardie / 44 ter rue Jean-Bart - CS20275 - 59019 LILLE cedex

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20201102/88de3e73/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bloc logo
Type: image/png
Size: 22950 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20201102/88de3e73/attachment-0001.png>


More information about the QGIS-Developer mailing list