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

Unsupported geometry types in coverageSimplify result in segfaults #1031

Closed
martinfleis opened this issue Jan 23, 2024 · 0 comments
Closed

Comments

@martinfleis
Copy link

coverageSimplify has a tendency to produce segfaults when given unsupported geometry types. I ran into it while doing the shapely wrapper in shapely/shapely#1969.

See examples below:

% geosop -a "MULTILINESTRING ((200 100, 100 100, 200 200), (200 200, 200 100), (200 200, 300 100, 200 100))" -v -e coverageSimplify 10
Input A: WKT literal
Read 1 geometries, 8 vertices  -- 174 usec
zsh: segmentation fault  geosop -a  -v -e coverageSimplify 10
% geosop -a "MULTIPOINT ((0 0), (0 1), (1 1), (1 0))" -v -e coverageSimplify 2
Input A: WKT literal
Read 1 geometries, 4 vertices  -- 59 usec
zsh: segmentation fault  geosop -a "MULTIPOINT ((0 0), (0 1), (1 1), (1 0))" -v -e coverageSimplify 2
% geosop -a "GEOMETRYCOLLECTION (POLYGON ((0 0, 20 0, 20 10, 10 5, 0 10, 0 0)), LINEARRING (0 10, 10 5, 20 10, 20 20, 0 20, 0 10))" -v -e coverageSimplify 20 
Input A: WKT literal
Read 1 geometries, 12 vertices  -- 40 usec
zsh: segmentation fault  geosop -a  -v -e coverageSimplify 20

CoverageUnion results in IllegalArgumentException: Unhandled geometry type in CoverageUnion. which is what I'd expect here as well.

Using GEOS 3.12.1.

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

No branches or pull requests

2 participants