PANOimagen / profiletool

Home to the QGis Profiletool plugin. Initial work on this fork was partially funded by the C.A. La Rioja
https://plugins.qgis.org/plugins/profiletool/
GNU General Public License v2.0
33 stars 19 forks source link

RuntimeWarning with slopes #90

Open nicogodet opened 1 year ago

nicogodet commented 1 year ago
2023-05-29T09:58:33     WARNING    warning:C:\Users/godet/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\profiletool\tools\profilers.py:46: RuntimeWarning: invalid value encountered in divide
              slope_pct = 100.0 * (y[1:] - y[:-1]) / (x[1:] - x[:-1])

             traceback: File "C:\Users/godet/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\profiletool\tools\profiletool_core.py", line 97, in 
              self.dockwidget.plotComboBox.currentIndexChanged.connect(lambda index: self.plotProfil())
              File "C:\Users/godet/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\profiletool\tools\profiletool_core.py", line 235, in plotProfil
              profile["plot_x"], profile["plot_y"] = profile_func(profile)
              File "C:\Users/godet/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\profiletool\tools\profilers.py", line 46, in slopes_pct
              slope_pct = 100.0 * (y[1:] - y[:-1]) / (x[1:] - x[:-1])

2023-05-29T09:58:57     WARNING    warning:C:\Users/godet/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\profiletool\tools\profilers.py:46: RuntimeWarning: invalid value encountered in divide
              slope_pct = 100.0 * (y[1:] - y[:-1]) / (x[1:] - x[:-1])

             traceback: File "C:\Users/godet/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\profiletool\tools\profiletool_core.py", line 97, in 
              self.dockwidget.plotComboBox.currentIndexChanged.connect(lambda index: self.plotProfil())
              File "C:\Users/godet/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\profiletool\tools\profiletool_core.py", line 235, in plotProfil
              profile["plot_x"], profile["plot_y"] = profile_func(profile)
              File "C:\Users/godet/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\profiletool\tools\profilers.py", line 59, in slopes_deg
              x, slope_pct = slopes_pct(p)
              File "C:\Users/godet/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\profiletool\tools\profilers.py", line 46, in slopes_pct
              slope_pct = 100.0 * (y[1:] - y[:-1]) / (x[1:] - x[:-1])

As reminder for my todolist