-
Notifications
You must be signed in to change notification settings - Fork 557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encountered some issues when using 'voronoi_polygons' #2043
Comments
To read the file (@shiyue-code it would be helpful to include that in your report, it's not necessarily clear what exactly the file exists of): import shapely
with open("polygon.wkb", "rb") as f:
borders = shapely.from_wkb(f.read()) I can reproduce this, causing a lot of memory usage and then (in my case, at the point of taking around 30GB hitting the limit of my system) killing itself. It is a lot of points though, and GEOS builds up indices on top of this to determine the resulting polygons I assume, so honestly I have no clue if this is "expected" and GEOS simply cannot really handle that much of points given the way the algo works, or if there is actually something GEOS could do to improve memory usage. In either case, it's an upstream GEOS issue, so I would recommend reporting it there (https://github.com/libgeos/geos/issues) |
Thank you for your response, I reported the issue in GEOS. |
Is this a bug?
Using
voronoi_polygons(road)
resulted in a memory usage of over 10 GB and then was forcibly terminated by the OOM killer. The road consists of approximately 4.6 million points forming polygons with holes. However, there were no issues encountered when using from scipy.spatial import Voronoi, and the memory usage was minimal.Steps to reproduce the problem.
First import the geometry from the ’polygon.wkb‘ file. The file's cloud drive link is file: https://drive.google.com/file/d/14pH9wpJRURtokWLc_rpvo2jykLDSLN0-/view?usp=drive_link
This is actually a very complex road
Then use the following code to test if it will result in an OOM.
scipy.spatial .Voronoi is ok
Operating system
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
Shapely version and provenance
shapely 2.0.3
The text was updated successfully, but these errors were encountered: