Bug report #8002
Voronoi Polygons tool makes overlapped polygons
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Processing/QGIS | ||
Affected QGIS version: | 3.0.0 | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | Yes | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 16852 |
Description
1) Open vector layer garden-nodes-merc1.shp (in attachment);
2) Build Voronoi Polygons using appropriate tool;
3) Change transparency of layer to 50%;
In result you can see that some of adjacent polygon are overlapped
Related issues
Associated revisions
[processing] Update to VoronoiPolygons.py, some fixes for #8002
- Update to VoronoiPolygons.py, fixes #8002 adds comments, ++
- Fixed a spelling an an indentation mistake reported by travis
- Found some new cases (vertical line clipping and a mistake in the handling of extreme points)
(cherry-picked from 28fa839a0)
[processing] Added isclose function to VoronoyPolygons.py to avoid numerical instability
Fixes #8002 - hopefully, and adds tests
[processing] Added isclose function to VoronoyPolygons.py to avoid numerical instability
Fixes #8002 - hopefully, and adds tests
(cherry-picked from d2b71c30)
History
#1 Updated by Maxim Dubinin over 11 years ago
f1f17ed
works good for me (with 5% buffer and without)
#2 Updated by dr - over 11 years ago
- File voronoi-issue.png added
- Operating System set to Windows
Update QGIS to current master 5e29777 and get the same issue.
#3 Updated by Giovanni Manghi over 11 years ago
- Status changed from Open to Feedback
result is ok here too (master/linux).
#4 Updated by Daniel Vaz over 11 years ago
I can't reproduce this bug. Probably it was fixed in meanwhile.
I think that issue should be closed.
Thanks in advance.
#5 Updated by Giovanni Manghi over 11 years ago
- Resolution set to worksforme
- Status changed from Feedback to Closed
Closing for lack of feedback and because seems ok now, please reopen if necessary.
#6 Updated by Giles Collingwood over 11 years ago
- File Capture2.PNG added
- File london.geojson added
- Status changed from Closed to Reopened
Hi I managed to reproduce this issue with a very small data set of 14 points on the master version today (QGIS-OSGeo4W-1.9.0-35-Setup.exe) attached a screenshot showing the overlapping polygon selected and the data file that generated it.
#7 Updated by Anita Graser over 10 years ago
- Category changed from Vectors to 44
- Resolution deleted (
worksforme)
You can easily replicate the issue using the airports dataset from QGIS sample dataset. It creates overlapping polygons if used from the Vector menu as well as in processing.
#8 Updated by Andrew Bevitt over 9 years ago
- File voronoi.patch added
- File voronoi_patched.png added
- File voronoi_errors.png added
This is still an issue in 2.8* and the master branch. This issue stems from the line clipping function incorrectly calculating intercept points for the buffer boundary. Attached is a patch to correct this and two example images before and after (5% buffer applied). In the images the Voronoi layer has 50% transparency. In the before the darker pinky/purple areas are where the polygons are overlapping. In the after there is no such darker (green) region.
#9 Updated by Giovanni Manghi over 9 years ago
- Operating System deleted (
Windows) - Pull Request or Patch supplied changed from No to Yes
Andrew Bevitt wrote:
This is still an issue in 2.8* and the master branch. This issue stems from the line clipping function incorrectly calculating intercept points for the buffer boundary. Attached is a patch to correct this and two example images before and after (5% buffer applied). In the images the Voronoi layer has 50% transparency. In the before the darker pinky/purple areas are where the polygons are overlapping. In the after there is no such darker (green) region.
Many thanks for this patch! I tested it and it produces much better outputs, for example fixes the issue described here #13092.
Anyway there are point layers where still overlapping polygons are produced, for example the "airports" shape of the qgis sample dataset.
#10 Updated by Giovanni Manghi almost 8 years ago
- Category changed from 44 to Processing/QGIS
#11 Updated by Giovanni Manghi almost 8 years ago
- Priority changed from High to Normal
#12 Updated by Giovanni Manghi over 7 years ago
- Easy fix? set to No
- Regression? set to No
#13 Updated by Alexander Bruy almost 7 years ago
- Duplicated by Bug report #18212: Voronoi creates overlapping polygons added
#14 Updated by Erik Sigra almost 7 years ago
This is a confirmation that the bug is still reproducible in QGIS 3.0.0.
#15 Updated by Giovanni Manghi almost 7 years ago
- Description updated (diff)
- Affected QGIS version changed from master to 3.0.0
#16 Updated by Håvard Tveite over 6 years ago
- % Done changed from 0 to 100
- Status changed from Reopened to Closed
Applied in changeset qgis|28fa839a0835af450cd3eaf3b1316b5433da46ea.
#17 Updated by Håvard Tveite over 6 years ago
With the applied changeset, there are still issues with overlapping polygons for the airports dataset. https://github.com/qgis/QGIS/pull/7566 adds more numerically robust comparison, and that seems to solve the issue also for the airports dataset.
#18 Updated by Håvard Tveite over 6 years ago
The pull request that fixed the airport dataset issue has been merged, so I suggest that this issue can be closed.
#19 Updated by Giovanni Manghi over 6 years ago
- Resolution set to fixed/implemented