Error in validity (report) (was: multipolygon buffer result either invalid geometry or valid geometry but wrong)

Open
#1,192 6 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 2 days

@barendgehrels is already working on this.

Since Sep 14, 2023.

Assessment

This issue has not been assessed yet.

Description

I want to buffer of a small amount the multipolygon in the following picture (I apologize if it is quite complicated, I tried to replicate the issue in a simpler shape but I could not make it):

image

When applying the buffer algorithm, I have encountered two problems:

  1. if the buffer amount is 0.05, we obtain an invalid geometry due to self-intersections in the external border;
  2. if the buffer amount is 0.050005, we obtain a valid geometry, but the result is wrong (see image below).
    image

Here below a godbolt link to replicate this problem:
https://godbolt.org/z/vM9ex7MrW

Dominant language
C++
Stars
519
Forks
241
Avg merge
4d 15h
Merged PRs (30d)
9

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/geometry

All issues in boostorg/geometry

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.