Skip to content

Commit

Permalink
Regression test for mitre buffer that previously made an invalid geom…
Browse files Browse the repository at this point in the history
…etry
  • Loading branch information
mwtoews committed Feb 26, 2024
1 parent 7273a96 commit 0a8fc37
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/unit/operation/buffer/BufferParametersTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,21 @@ void object::test<22>()
"POLYGON ((-4.14213562373095 -10, -10 -4.14213562373095, -10 104.14213562373095, -4.14213562373095 110, 104.14213562373095 110, 110 104.14213562373095, 110 -4.142135623730951, 104.14213562373095 -10, -4.14213562373095 -10))");
}

// Buffer produces invalid output
// https://github.com/libgeos/geos/issues/856
template<>
template<>
void object::test<23>()
{
auto geom = _reader.read("POLYGON ((-23.989123360549296 73.1287474328027, -22.537997105552297 94.06368412079055,-18.796973600895146 93.80437130274495,-17.80121237894408 108.16990157009043,-21.542235883601226 108.42921438813606,-20.967403753721864 116.7221345967023,-4.728530705460814 116.7221568196225,-7.82790182044367 72.00851605865441,-23.989123360549296 73.1287474328027))");

BufferParameters bp;
bp.setJoinStyle(BufferParameters::JOIN_MITRE);
BufferOp op(geom.get(), bp);

auto result = op.getResultGeometry(10);
ensure(result->isValid());
}


} // namespace tut
Expand Down

0 comments on commit 0a8fc37

Please sign in to comment.