Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/operation/overlayng/OverlayEdgeRing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void
OverlayEdgeRing::closeRing(CoordinateSequence& pts)
{
if(pts.size() > 0) {
pts.add(pts.getAt(0), false);
pts.closeRing(false);
}
}

Expand Down
15 changes: 15 additions & 0 deletions tests/unit/capi/GEOSGeom_setPrecisionTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,5 +326,20 @@ void object::test<23>()
checkPrecision(wkt, 100000, "LINESTRING ( 700000 200000, 700000 1400000)");
}

template<>
template<>
void object::test<24>()
{
// https://github.com/libgeos/geos/issues/1365{
set_test_name("M value retained on last point");

input_ = fromWKT("POLYGON ZM ((0 0 0 0, 0 1 1 1, 1 1 2 3, 1 0 4 5, 0 0 6 7))");
expected_ = fromWKT("POLYGON ZM ((0 1 1 1, 1 1 2 3, 1 0 4 5, 0 0 6 7, 0 1 1 1))");

result_ = GEOSGeom_setPrecision(input_, 0.1, 0);

ensure(GEOSEqualsIdentical(result_, expected_));
}

} // namespace tut

Loading