Skip to content
Permalink
Browse files

make valid geometry befor perform geos methods. Fixes #32488

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 a208ec95d02089d90d982bf2e11b537ef507d6b1
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/geometry/qgsgeometryeditutils.cpp
@@ -265,7 +265,7 @@ std::unique_ptr<QgsAbstractGeometry> QgsGeometryEditUtils::avoidIntersections( c
if ( !f.hasGeometry() )
continue;

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

0 comments on commit a208ec9

Please sign in to comment.