Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Ensure quadrant segments are always at least 8 when doing offset curve
Works around a GEOS bug artifacts when using GEOS 3.11.{0,1,2}

Closes GH-53165 in 3.28 branch
  • Loading branch information
strk authored and nyalldawson committed Jun 1, 2023
1 parent 41b120c commit 5e4f79b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/geometry/qgsgeos.cpp
Expand Up @@ -2421,6 +2421,9 @@ QgsAbstractGeometry *QgsGeos::offsetCurve( double distance, int segments, Qgis::
geos::unique_ptr offset;
try
{
// Force quadrant segments to be at least 8, see
// https://github.com/qgis/QGIS/issues/53165#issuecomment-1563470832
if ( segments < 8 ) segments = 8;
offset.reset( GEOSOffsetCurve_r( geosinit()->ctxt, mGeos.get(), distance, segments, static_cast< int >( joinStyle ), miterLimit ) );
}
CATCH_GEOS_WITH_ERRMSG( nullptr )
Expand Down

0 comments on commit 5e4f79b

Please sign in to comment.