Bug report #18219
Delaunay Triangulation and Voronoi Polygons do not work
Status: | Closed | ||
---|---|---|---|
Priority: | High | ||
Assignee: | - | ||
Category: | Processing/QGIS | ||
Affected QGIS version: | 3.0.0 | Regression?: | Yes |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 26110 |
Description
Delaunay Triangulation and Voronoi Polygon do not work.
This previously worked flawlessly in 2.18.16.
Built qgis rpm using rpm/buildrpms.sh.
Sample data attached.
Associated revisions
[processing] Update the comparison implementation in voronoi.py (fixes #18219)
When "translating" the cmp function of Site and Halfedge to Python 3, the lt function was forgotten. It has been added.
[processing] Update the comparison implementation in voronoi.py (fixes #18219)
When "translating" the cmp function of Site and Halfedge to Python 3, the lt function was forgotten. It has been added.
(cherry-picked from ca00174)
History
#1 Updated by Basil Eric Rabi over 6 years ago
- File DH.dbf added
- File DH.shp added
- File DH.prj added
- File DH.shx added
- File DH.qpj added
- File DH.cpg added
Re-uploading a sample data that works in 2.18.16 (Something's wrong with tmpDF shapefile).
Regression is also present in Windows. Tested the stand-alone 3.0.0 installer.
#2 Updated by Giovanni Manghi over 6 years ago
- Category changed from Python plugins to Processing/QGIS
- Operating System deleted (
fedora 27) - Priority changed from Normal to High
- Subject changed from Geometry Tools Delaunay Triangulation and Voronoi Polygon do not work to Delaunay Triangulation and Voronoi Polygons do not work
Connfirmed.
#3 Updated by Håvard Tveite over 6 years ago
The problem seems to be in python/plugins/processing/algs/qgis/voronoi.py.
#4 Updated by Håvard Tveite over 6 years ago
I think I have found the error in voronoi.py.
When translating the cmp method of Site and Halfedge from Python 2 to Python 3, the gt function that is used by the > operator in the cmp method was not implemented. I fixed this in https://github.com/qgis/QGIS/pull/7554. With this change, the Voronoi diagram of the DH dataset seems to be correctly generated.
#5 Updated by Basil Eric Rabi over 6 years ago
I just tested the patch, it works great! I hope it will be merged soon. Thank you!
#6 Updated by Håvard Tveite over 6 years ago
- % Done changed from 0 to 100
- Status changed from Open to Closed
Applied in changeset qgis|ca0017410b8446c160b51121e546ac5fb118e6f0.