-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Excessive memory usage with prequantization enabled #213
Comments
Thank you for raising the issue and it is great to see you find this package useful for your need! |
🙂! If you are interested, I use this package to run https://github.com/Zaczero/osm-countries-geojson. It finally resolved the issue with overlaps/gaps produced during the simplification process. And now it's perfect! |
Interesting! Halfway in the computation of a topology the line segments are also split where the order is not always clear. In the hashmap-step I use a |
I am primarily posting this issue for future people facing a similar problem.
In my case, when the prequantize option is enabled (which is the default setting), the toposimplify method consumes 25GB of memory. However, when I disable the prequantize option, memory usage peaks at just 5GB. I utilize shapely for simplification.
Reproduction steps
Download both parts of the archive:
countries1.zip
countries2.zip
Combine the archives:
cat countries1.zip countries2.zip > countries.zip
Unzip it.
Execute the following Python code snippet:
Monitor memory usage.
To resolve the issue, replace
topo
with:By the way, should prequantization be enabled by default? I personally find it odd that the library performs certain calculations by default, even if they don't apply to my use case and don't provide any benefit. I can only understand such default behavior if it benefits everyone. Otherwise, this should be an opt-in operation (the same as simplification is opt-in).
The text was updated successfully, but these errors were encountered: