Skip to content
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

concave_hull produces segmentation fault with specific combination of points #1873

Open
raine-fmg opened this issue Aug 21, 2023 · 3 comments

Comments

@raine-fmg
Copy link

Expected behavior and actual behavior.

concave_hull is causing a segmentation fault

Steps to reproduce the problem.

from shapely import concave_hull, MultiPoint
import numpy as np

concave_hull(MultiPoint(np.array([[ 584245.72096874, 7549593.72686167],
       [584251.71398371, 7549594.01629478],
       [584242.72446125, 7549593.58214511],
       [584230.73978847, 7549592.9760418 ],
       [584233.73581213, 7549593.13045099],
       [584236.7318358 , 7549593.28486019],
       [584239.72795377, 7549593.43742855],
       [584227.74314188, 7549592.83423486]])))

Operating system

Windows 10 Enterprise 22H2

Shapely version and provenance

shapely==2.0.1 (installed via pip)
numpy==1.24.2

Aditional Info

I recreated in a fresh venv to ensure there were no other complexities associated with my environment. I originally posted the issue here on SO, just in case it was something geometric that I wasn't aware of. It seems to be something to do with collinearity (but I include more notes on removing certain points etc in my SO question).

@jorisvandenbossche
Copy link
Member

Thanks for the report!

This seems to be an issue with the current concave_hull implementation when indeed the points are almost "flat". This was reported to upstream GEOS as well a few days ago: libgeos/geos#946 (and added your reproducer as an additional example there).

@jorisvandenbossche
Copy link
Member

This will be fixed in GEOS 3.12.1 (when released)

@mwtoews
Copy link
Member

mwtoews commented Jan 31, 2024

Also fixed in GEOS 3.11.4 (when released).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants