boostorg / boostorg/geometry

Feature Request: Resolve Algorithm Inconsistency between segment/box and linestring/ring

Open
#483 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
517
Forks
232
PR merge metrics
No merged PRs in 30d

Description

I tested some algorithms for binary combinations of
- `boost::geometry::model::d2::point_xy`
- `boost::geometry::model::polygon`
- `boost::geometry::model::box`
- `boost::geometry::model::ring`
- `boost::geometry::model::segment`
- `boost::geometry::model::linestring`

as input and found inconsistencies (some are documented).

The following functions do not support `segment` or `box` even though they do `linestring` and `ring`:
- `covered_by`
- `crosses`
- `overlaps`
- `relation`
- `touches`

For example `crosses(linestring, ring)` works but `crosses(segment, box)` does not.

The following functions do not support only `(box, box, output_collection)`
- `difference`
- `intersection`
- `sym_difference`
- `union_`

For example `union_(box, ring, output_collection)` works.

If I understand correctly `segemnt` ⊂ `linestring` and `box` ⊂ `ring` ⊂ `polygon` hold (actually convertible).
These inconsistencies are not intuitive and force users to convert `segment` and `box`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.