Skip to content

Commit c237ea5

Browse files
committedMar 3, 2014
#9655: fix invalid polygons with buffer_0
1 parent 0775675 commit c237ea5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎src/core/qgspallabeling.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1840,6 +1840,12 @@ void QgsPalLayerSettings::registerFeature( QgsFeature& f, const QgsRenderContext
18401840
}
18411841
}
18421842

1843+
// fix invalid polygons
1844+
if ( QGis::singleType( QGis::flatType( geom->wkbType() ) ) == QGis::WKBPolygon && !geom->isGeosValid() )
1845+
{
1846+
geom->fromGeos( GEOSBuffer( geom->asGeos(), 0, 0 ) );
1847+
}
1848+
18431849
// CLIP the geometry if it is bigger than the extent
18441850
// don't clip if centroid is requested for whole feature
18451851
bool do_clip = false;

0 commit comments

Comments
 (0)
Please sign in to comment.