Navigation Menu

Skip to content

Commit

Permalink
pal labeling: do not try to register feature if GEOS geometry is empty
Browse files Browse the repository at this point in the history
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 699b8f3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/qgspallabeling.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 699b8f3

Please sign in to comment.