Bug #5573
A particular triangulation returns an error
| Status: | Closed | Start Date: | 05/11/2012 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | % Done: | 0% |
||
| Category: | - | |||
| Target version: | - | |||
| Must fix: | Status info: | |||
| Platform: | Resolution: | fixed | ||
| Platform version: | Patch supplied: | No |
Description
The plugin is made to handle diverging bearings, but one particular was found to make the plugin return a python error
An error has occured while executing Python code:
Traceback (most recent call last):
File "/home/gio/.qgis/python/plugins/triangulation/triangulation_gui.py", line 175, in accept
self.doProcess()
File "/home/gio/.qgis/python/plugins/triangulation/triangulation_gui.py", line 433, in doProcess
(x,y) = triang(bearings[i][j1], bearings[i][j2])
File "/home/gio/.qgis/python/plugins/triangulation/triangulation_data.py", line 65, in triang
x = (x1 * tan(beta1) - x2 * tan(beta2) + y2 - y1) / (tan(beta1) - tan(beta2))
ZeroDivisionError: float division by zero
Attached the sample dataset, the offending bearing are the one with FIX_ID = 110
History
Updated by Borys Jurgiel 3 months ago
I can't reproduce it and it shouldn't happen. I made a second check that tan(beta1) != tan(beta2), it's in version 0.1.6 waiting for Giuseppe to publish.
Updated by Giovanni Manghi 3 months ago
- Status changed from New to Closed
- Resolution set to fixed
Borys Jurgiel wrote:
I can't reproduce it and it shouldn't happen. I made a second check that tan(beta1) != tan(beta2), it's in version 0.1.6 waiting for Giuseppe to publish.
ok, so I guess we can close this. Thanks!