Skip to content
Permalink
Browse files

Merge remote-tracking branch 'alvaro/Issue_10433'

  • Loading branch information
wonder-sk committed Jun 11, 2014
2 parents 7f434a0 + 7e0ef8f commit f520f312390d93f55588e92859856705bea78f5e
Showing with 10 additions and 2 deletions.
  1. +8 −1 src/core/qgsmaptopixelgeometrysimplifier.cpp
  2. +2 −1 src/core/qgspallabeling.cpp
@@ -247,10 +247,17 @@ bool QgsMapToPixelSimplifier::simplifyWkbGeometry( int simplifyFlags, QGis::WkbT
// Fix the topology of the geometry
if ( numTargetPoints <= ( isaLinearRing ? 2 : 1 ) )
{
unsigned char* targetTempWkb = targetWkb;
int targetWkbTempSize = targetWkbSize;

sourceWkb = sourcePrevWkb;
targetWkb = targetPrevWkb;
targetWkbSize = targetWkbPrevSize;
return generalizeWkbGeometry( wkbType, sourceWkb, sourceWkbSize, targetWkb, targetWkbSize, QgsRectangle( xmin, ymin, xmax, ymax ), writeHeader );
bool isok = generalizeWkbGeometry( wkbType, sourceWkb, sourceWkbSize, targetWkb, targetWkbSize, QgsRectangle( xmin, ymin, xmax, ymax ), writeHeader );
if ( isok ) return true;

targetWkb = targetTempWkb;
targetWkbSize = targetWkbTempSize;
}
if ( isaLinearRing )
{
@@ -1917,7 +1917,8 @@ void QgsPalLayerSettings::registerFeature( QgsFeature& f, const QgsRenderContext
// fix invalid polygons
if ( geom->type() == QGis::Polygon && !geom->isGeosValid() )
{
geom->fromGeos( GEOSBuffer( geom->asGeos(), 0, 0 ) );
const GEOSGeometry* geos = geom->asGeos();
if ( geos ) geom->fromGeos( GEOSBuffer( geos, 0, 0 ) );
}

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

0 comments on commit f520f31

Please sign in to comment.
You can’t perform that action at this time.