Skip to content

Commit

Permalink
make valid geometry befor perform geos methods. Fixes #32488
Browse files Browse the repository at this point in the history
The avoidIntersection method uses GEOS as backend to perform the operations.
However, our avoidIntersection method does not check if the geometries are valid.
Geos does not perform this verification either, so the resulting geometry may
still overlap a polygon that is to be avoided.
  • Loading branch information
lbartoletti authored and nyalldawson committed Feb 12, 2021
1 parent b47c6a9 commit a208ec9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/geometry/qgsgeometryeditutils.cpp
Expand Up @@ -265,7 +265,7 @@ std::unique_ptr<QgsAbstractGeometry> QgsGeometryEditUtils::avoidIntersections( c
if ( !f.hasGeometry() )
continue;

nearGeometries << f.geometry();
nearGeometries << f.geometry().makeValid();
}
}

Expand Down

0 comments on commit a208ec9

Please sign in to comment.