boostorg / boostorg/geometry

within returns a wrong result with multi-linestrings

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

Description

The following program returns true while this is clearly not the case.

```cpp
#include

int main() {
using Point = boost::geometry::model::d2::point_xy;
using Linestring = boost::geometry::model::linestring;
using MultiLinestring = boost::geometry::model::multi_linestring;

MultiLinestring ml1, ml2;
boost::geometry::read_wkt("MULTILINESTRING((10 10, 20 20 ), (15 15 , 30 15))", ml1);
boost::geometry::read_wkt("MULTILINESTRING((10 10, 20 20), (60 -60, 30 15))", ml2);

std::cout << boost::geometry::within(ml2, ml1) << std::endl;

return 0;
}
```

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.