Restore _makeUnion

This commit is contained in:
Hugo Mercier 2014-06-16 10:30:28 +02:00
parent 5963510519
commit 1613d840ce

View File

@ -6402,16 +6402,12 @@ namespace QgsGeometryAlgorithms
QgsGeometry* unaryUnion( const QList<QgsGeometry*>& geometryList )
{
QVector<GEOSGeometry*> geoms;
QList<GEOSGeometry*> geoms;
foreach( QgsGeometry* g, geometryList )
{
geoms.append( GEOSGeom_clone(g->asGeos()) );
}
GEOSGeometry* geomCollection = 0;
geomCollection = createGeosCollection( GEOS_GEOMETRYCOLLECTION, geoms );
GEOSGeometry* geomUnion = GEOSUnaryUnion( geomCollection );
GEOSGeom_destroy( geomCollection );
GEOSGeometry *geomUnion = _makeUnion( geoms );
QgsGeometry *ret = new QgsGeometry();
ret->fromGeos( geomUnion );
return ret;