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/OverlayEdge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ OverlayEdge::getCoordinatesOriented() const
void
OverlayEdge::addCoordinates(CoordinateSequence* coords) const
{
bool isFirstEdge = coords->size() > 0;
const bool isFirstEdge = coords->isEmpty();
if (direction) {
std::size_t startIndex = 1;
if (isFirstEdge) {
Expand Down
6 changes: 2 additions & 4 deletions tests/unit/capi/GEOSGeom_setPrecisionTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,10 @@ 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))");

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

ensure(GEOSEqualsIdentical(result_, expected_));
ensure_geometry_equals_identical(result_, input_);
}

} // namespace tut
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/capi/GEOSMakeValidTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ void object::test<7>()
ensure(input_);

result_ = GEOSMakeValid(input_);
expected_ = fromWKT("MULTIPOLYGON ZM (((0 0 1 2, 0.5 0.5 2.5 3.5, 1 0 2 3, 0 0 1 2)), ((1 1 4 5, 0.5 0.5 2.5 3.5, 0 1 3 4, 1 1 4 5)))");
expected_ = fromWKT("MULTIPOLYGON ZM (((0.5 0.5 2.5 3.5, 1 0 2 3, 0 0 1 2, 0.5 0.5 2.5 3.5)), ((0.5 0.5 2.5 3.5, 0 1 3 4, 1 1 4 5, 0.5 0.5 2.5 3.5)))");

ensure_geometry_equals_identical(result_, expected_);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/capi/GEOSSubdivideByGridTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void object::test<2>()

result_ = GEOSSubdivideByGrid(input_, 1, 0, 5, 3, 4, 3, true);

ensure_geometry_equals_identical(expected_, result_);
ensure_geometry_equals(expected_, result_);
}

}
Loading