Skip to content

Commit

Permalink
#9655: fix invalid polygons with buffer_0
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuarte47 committed Mar 3, 2014
1 parent 0775675 commit c237ea5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/qgspallabeling.cpp
Expand Up @@ -1840,6 +1840,12 @@ void QgsPalLayerSettings::registerFeature( QgsFeature& f, const QgsRenderContext
}
}

// fix invalid polygons
if ( QGis::singleType( QGis::flatType( geom->wkbType() ) ) == QGis::WKBPolygon && !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 c237ea5

Please sign in to comment.