zoran-cuckovic / QGIS-visibility-analysis

Quantum GIS plugin for visibility analysis
GNU General Public License v3.0
72 stars 17 forks source link

Changes in the PyGIS code from version 1.7 and 1.8 #62

Closed ghost closed 6 months ago

ghost commented 2 years ago

Zoran,

I am a frequent user of your Visibility Analysis plugin. I currently use QGIS 3.24.3-Tisler on Windows 10 Pro. It uses Python 3.9.5. My colleagues and I use your plugin for viewshed and intervisibility analyses, and often incorporate it into our PyGIS code to automate the process of collecting visibility data.

Until last week I had no issues with the plugin. However, when I updated my plugins I found that the tool I created with the plugin no longer worked. The same was true of the Python code my colleagues created using this plugin.

When I tried to run code containing the plugin, I got the following error:

_core.QgsProcessingException: Error: Algorithm visibility:create_viewpoints not found

When I tried to run a model containing the plugin, I got this error:

Cannot run model, the following algorithms are not available on this system: visibility:create_viewpoints_2, visibility:create_viewpoints_1, visibility:Intervisibility_1, visibility:Viewshed_1

When I investigated what was happening I discovered that in the code for the plugin had been changed:

processing.run(“visibility:create_viewpoints”, {}) was changed to processing.run("visibility:createviewpoints", {}) processing.run(“visibility:Viewshed”, {}) was changed to processing.run(“visibility:viewshed”, {}) processing.run(“visibility:Intervisibility”, {}) was changed to processing.run("visibility:intervisibility", {})

After finding this out, I wanted to know what else had changed in the code, but when I tried to find documentation on version 1.8, I couldn’t find any information about the changes.

Can you tell me where to find information about the changes in the code from version 1.8 and version 1.7?

Thank you for your time and your patience.

Sincerely,

Matt Clark

zoran-cuckovic commented 2 years ago

Dear Matt,

Yes, there have been some changes in the last version. @JanCaha proposed to rename modules in order to conform to QGIS standards : you can check his suggestions and the commit through issue report https://github.com/zoran-cuckovic/QGIS-visibility-analysis/issues/59

Other than module names, there have been no further changes.

Best, Zoran

ghost commented 2 years ago

Zoran,

Thank you for taking the time to respond to my questions. My code is running wonderfully.

Sincerely,

Matt Clark