Skip to content

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

Open
tyrasd wants to merge 3 commits into
mainfrom
intersects-touching-geoms
Open

don't return degenerate geometries in fast intersects operation#535
tyrasd wants to merge 3 commits into
mainfrom
intersects-touching-geoms

Conversation

@tyrasd

@tyrasd tyrasd commented Feb 20, 2025

Copy link
Copy Markdown
Member

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
@SlowMo24

Copy link
Copy Markdown
Contributor

I guess there is no plan on merging this any more?

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

2 participants