mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Restore _makeUnion
This commit is contained in:
parent
5963510519
commit
1613d840ce
@ -6402,16 +6402,12 @@ namespace QgsGeometryAlgorithms
|
|||||||
|
|
||||||
QgsGeometry* unaryUnion( const QList<QgsGeometry*>& geometryList )
|
QgsGeometry* unaryUnion( const QList<QgsGeometry*>& geometryList )
|
||||||
{
|
{
|
||||||
QVector<GEOSGeometry*> geoms;
|
QList<GEOSGeometry*> geoms;
|
||||||
foreach( QgsGeometry* g, geometryList )
|
foreach( QgsGeometry* g, geometryList )
|
||||||
{
|
{
|
||||||
geoms.append( GEOSGeom_clone(g->asGeos()) );
|
geoms.append( GEOSGeom_clone(g->asGeos()) );
|
||||||
}
|
}
|
||||||
|
GEOSGeometry *geomUnion = _makeUnion( geoms );
|
||||||
GEOSGeometry* geomCollection = 0;
|
|
||||||
geomCollection = createGeosCollection( GEOS_GEOMETRYCOLLECTION, geoms );
|
|
||||||
GEOSGeometry* geomUnion = GEOSUnaryUnion( geomCollection );
|
|
||||||
GEOSGeom_destroy( geomCollection );
|
|
||||||
QgsGeometry *ret = new QgsGeometry();
|
QgsGeometry *ret = new QgsGeometry();
|
||||||
ret->fromGeos( geomUnion );
|
ret->fromGeos( geomUnion );
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user