root676 / QNEAT3

QNEAT3 - Qgis Network Analysis Toolbox 3
GNU General Public License v3.0
65 stars 13 forks source link

Current processing setup does not allow qgis_process (CLI) to access QNEAT3 #57

Closed florisvdh closed 2 years ago

florisvdh commented 2 years ago

This plugin cannot be called from the standalone CLI program qgis_process. See:

The plugin is not correctly initialized. The processing is setted up in initGui() of the plugin but it should be done in initProcessing() instead. That means that processing tools will only be available if Gui of QGIS exists ;)

Originally posted by @JanCaha in https://github.com/paleolimbot/qgisprocess/issues/73#issuecomment-1285955561

I'm just acting as a copy-cat here, not being a Python user.

root676 commented 2 years ago

Thanks for the report - can you check if qgis_process now recognizes QNEAT3?

JanCaha commented 2 years ago

Should be ok now :+1:

florisvdh commented 2 years ago

This seems perfect indeed, thanks!

$ qgis_process plugins
qt5ct: using qt5ct plugin
Available plugins
(* indicates loaded plugins which implement Processing providers)

* ViewshedAnalysis
* cartography_tools
  QNEAT3
* grassprovider
* processing
* sagaprovider
* otbprovider
$ 
$ qgis_process plugins enable QNEAT3
qt5ct: using qt5ct plugin
Enabling plugin: "QNEAT3"
Enabled QNEAT3 (QNEAT3)

Available plugins
(* indicates enabled plugins which implement Processing providers)

* ViewshedAnalysis
* cartography_tools
* QNEAT3
* grassprovider
* processing
* sagaprovider
* otbprovider
$ 
$ qgis_process list | grep -i qneat
qt5ct: using qt5ct plugin
QNEAT3 - Qgis Network Analysis Toolbox
    qneat3:OdMatrixFromLayersAsLines    OD Matrix from Layers as Lines (m:n)
    qneat3:OdMatrixFromLayersAsTable    OD Matrix from Layers as Table (m:n)
    qneat3:OdMatrixFromPointsAsCsv  OD-Matrix from Points as CSV (n:n)
    qneat3:OdMatrixFromPointsAsLines    OD-Matrix from Points as Lines (n:n)
    qneat3:OdMatrixFromPointsAsTable    OD Matrix from Points as Table (n:n)
    qneat3:isoareaascontoursfromlayer   Iso-Area as Contours (from Layer)
    qneat3:isoareaascontoursfrompoint   Iso-Area as Contours (from Point)
    qneat3:isoareaasinterpolationfromlayer  Iso-Area as Interpolation (from Layer)
    qneat3:isoareaasinterpolationfrompoint  Iso-Area as Interpolation (from Point)
    qneat3:isoareaaspointcloudfromlayer Iso-Area as Pointcloud (from Layer)
    qneat3:isoareaaspointcloudfrompoint Iso-Area as Pointcloud (from Point)
    qneat3:isoareaaspolygonsfromlayer   Iso-Area as Polygons (from Layer)
    qneat3:isoareaaspolygonsfrompoint   Iso-Area as Polygons (from Point)
    qneat3:shortestpathpointtopoint Shortest path (point to point)
ambarja commented 2 years ago

This seems perfect indeed, thanks!

$ qgis_process plugins
qt5ct: using qt5ct plugin
Available plugins
(* indicates loaded plugins which implement Processing providers)

* ViewshedAnalysis
* cartography_tools
  QNEAT3
* grassprovider
* processing
* sagaprovider
* otbprovider
$ 
$ qgis_process plugins enable QNEAT3
qt5ct: using qt5ct plugin
Enabling plugin: "QNEAT3"
Enabled QNEAT3 (QNEAT3)

Available plugins
(* indicates enabled plugins which implement Processing providers)

* ViewshedAnalysis
* cartography_tools
* QNEAT3
* grassprovider
* processing
* sagaprovider
* otbprovider
$ 
$ qgis_process list | grep -i qneat
qt5ct: using qt5ct plugin
QNEAT3 - Qgis Network Analysis Toolbox
  qneat3:OdMatrixFromLayersAsLines    OD Matrix from Layers as Lines (m:n)
  qneat3:OdMatrixFromLayersAsTable    OD Matrix from Layers as Table (m:n)
  qneat3:OdMatrixFromPointsAsCsv  OD-Matrix from Points as CSV (n:n)
  qneat3:OdMatrixFromPointsAsLines    OD-Matrix from Points as Lines (n:n)
  qneat3:OdMatrixFromPointsAsTable    OD Matrix from Points as Table (n:n)
  qneat3:isoareaascontoursfromlayer   Iso-Area as Contours (from Layer)
  qneat3:isoareaascontoursfrompoint   Iso-Area as Contours (from Point)
  qneat3:isoareaasinterpolationfromlayer  Iso-Area as Interpolation (from Layer)
  qneat3:isoareaasinterpolationfrompoint  Iso-Area as Interpolation (from Point)
  qneat3:isoareaaspointcloudfromlayer Iso-Area as Pointcloud (from Layer)
  qneat3:isoareaaspointcloudfrompoint Iso-Area as Pointcloud (from Point)
  qneat3:isoareaaspolygonsfromlayer   Iso-Area as Polygons (from Layer)
  qneat3:isoareaaspolygonsfrompoint   Iso-Area as Polygons (from Point)
  qneat3:shortestpathpointtopoint Shortest path (point to point)

Nice job!

root676 commented 2 years ago

Perfect! Thanks for reporting and testing - I will push the changes to the public plugin repository alongside with some other changes in near time.