mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
[pal] Use QgsGeometry::makeValid instead of buffer(0) to repair geometries
Possibly refs #14752
This commit is contained in:
parent
70242a3ac4
commit
e05a5a9302
@ -2931,12 +2931,12 @@ QgsGeometry QgsPalLabeling::prepareGeometry( const QgsGeometry &geometry, QgsRen
|
||||
// fix invalid polygons
|
||||
if ( geom.type() == QgsWkbTypes::PolygonGeometry && !geom.isGeosValid() )
|
||||
{
|
||||
QgsGeometry bufferGeom = geom.buffer( 0, 0 );
|
||||
if ( bufferGeom.isNull() )
|
||||
QgsGeometry validGeom = geom.makeValid();
|
||||
if ( validGeom.isNull() )
|
||||
{
|
||||
return QgsGeometry();
|
||||
}
|
||||
geom = bufferGeom;
|
||||
geom = validGeom;
|
||||
}
|
||||
|
||||
if ( !clipGeometry.isNull() &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user