#11710 closed Bugs (fixed)
is_simple - empty geometry logic
Reported by: | anonymous | Owned by: | Barend Gehrels |
---|---|---|---|
Milestone: | Boost 1.60.0 | Component: | geometry |
Version: | Boost 1.58.0 | Severity: | Problem |
Keywords: | Cc: | flippmoke@…, mkaravel |
Description
The logic around dealing with empty datasets and is_simple seems a little confusing:
An empty line - seg fault (see https://svn.boost.org/trac/boost/ticket/11709) An empty multi line - returns false An empty polygon - returns true An empty multi polygon - returns false
Should a multi polygon or linestring that is empty be considered simple. I would think it would as it would not have any anomalous geometric points, such as self intersection or self tangency.
Change History (3)
comment:1 by , 7 years ago
Cc: | added |
---|
comment:2 by , 7 years ago
Cc: | added |
---|---|
Resolution: | → fixed |
Status: | new → closed |
The ticket has been solved as part of GitHub PR 334: https://github.com/boostorg/geometry/pull/334
Details:
Empty lines and empty polygons as considered as invalid geometries. As such the result of is_simple is irrelevant. In the current fix (see PR above) is_simple returns false for both these geometries.
On the contrary empty multi-geometries are considered as valid (in reality representing the empty geometry), and with this bug fix they are considered as simple as well.
comment:3 by , 7 years ago
Milestone: | To Be Determined → Boost 1.60.0 |
---|
This also affects multipoints that are empty which are also returned as false.