<div dir="ltr">
<div>Does someone know if this algorithm is based on GEOS?</div><div>I am asking this because its <i>behaviour is</i> different from that of ST_Union in PostGIS or Spatialite (both based I assume on the GEOS library).</div><div><br></div><div>From QGIS helpÂ
<p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="color:rgb(102,102,102)">"This algorithm checks overlaps between features within the Input layer and creates separate features for overlapping and non-overlapping parts. </span></p><p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="color:rgb(102,102,102)">The area of overlap will create as many identical overlapping features as there are features that participate in that overlap."</span></p><p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="color:rgb(102,102,102)"><br></span></p><p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="color:rgb(102,102,102)">From PostGIS help</span>
<span><strong>"Aggregate variant:</strong></span>
returns a geometry that is the union of a rowset of geometries.
The ST_Union() function is an "aggregate" function in the terminology of PostgreSQL. </p><p style="margin:0px;text-indent:0px;white-space:pre-wrap"> That means that it operates on rows of data, in the same way the SUM() and AVG() functions do and like most aggregates, it also ignores NULL geometries."</p><p style="margin:0px;text-indent:0px;white-space:pre-wrap"><br></p><p style="margin:0px;text-indent:0px;white-space:pre-wrap">As Martin Davis wrote on the PostGIS user list following my message </p><pre><i>"The behaviour of ST_Union with polygons follows the mathematical concept
</i>><i> of union in point-set topology. It produces as few polygons as possible
</i>><i> which contain all the points of the input polygons...."<br><br>------------------------------------------------------------------------<br><br></i></pre><pre>Based on my little test the difference is that:<br></pre><pre>QGIS algorithm removes the overlapping parts creating separate polygons with the original attributes<i><br></i></pre><pre>ST_Union does not remove any overlapping part (and a multistep procedure is required to obtain the same results)<i><br></i></pre><pre><i><br></i></pre><pre><i>Regards<font color="#888888"><br></font></i></pre><font color="#888888"><pre><i>Antonio</i></pre></font></div>
</div>