Skip to content

Commit

Permalink
Fix for #9655: fix invalid polygons with buffer_0
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuarte47 authored and dakcarto committed Mar 8, 2014
1 parent 1f21273 commit 5b824ac
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/qgspallabeling.cpp
Expand Up @@ -1818,6 +1818,12 @@ void QgsPalLayerSettings::registerFeature( QgsVectorLayer* layer, QgsFeature& f
}
}

// fix invalid polygons
if ( geom->type() == QGis::Polygon && !geom->isGeosValid() )
{
geom->fromGeos( GEOSBuffer( geom->asGeos(), 0, 0 ) );
}

// CLIP the geometry if it is bigger than the extent
// don't clip if centroid is requested for whole feature
bool do_clip = false;
Expand Down

0 comments on commit 5b824ac

Please sign in to comment.