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

don't return degenerate geometries in fast intersects operation #535

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

tyrasd
Copy link
Member

@tyrasd tyrasd commented Feb 20, 2025

when a geometry only touches the clipping polygon (and has no points inside the poly), intersector.intersection() will produce a "degenerate" version of the original geometry: a (multi)linestring when the geometry was a polygon, or a (multi)point when the geometry was a linestring.
This can lead to inconsistencies when a geometry-type filter is used (e.g. geometry: polygon), as the output will then potentially also contain geometries that don't match the filter.

Corresponding issue

Fixes GIScience/ohsome-api#339

Checklist

when a geometry only touches the clipping polygon (and has no points inside the poly), `intersector.intersection()` will produce a "degenerate" version of the original geometry: a (multi)linestring when the geometry was a polygon, or a (multi)point when the geometry was a linestring.
This can lead to inconsistencies when a geometry-type filter is used (e.g. `geometry: polygon`), as the output will then potentially also contain geometries that don't match the filter.

Fixes GIScience/ohsome-api#339
@tyrasd tyrasd requested a review from rtroilo February 20, 2025 16:42
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

Successfully merging this pull request may close these issues.

The filter geometry:polygon returns multilines and geometrycollections
1 participant