Skip to content
Permalink
Browse files
pal labeling: do not try to register feature if GEOS geometry is empty
This removes the debug noise from GEOS when it tries to compute contains() predicate
  • Loading branch information
wonder-sk committed Jun 11, 2014
1 parent f520f31 commit 699b8f39e23c1e6707c86c55c3d11ad847a67586
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/core/qgspallabeling.cpp
@@ -1914,11 +1914,13 @@ void QgsPalLayerSettings::registerFeature( QgsFeature& f, const QgsRenderContext
}
}

if ( !geom->asGeos() )
return; // there is something really wrong with the geometry

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

// CLIP the geometry if it is bigger than the extent

0 comments on commit 699b8f3

Please sign in to comment.