https://issues.qgis.org/https://issues.qgis.org/favicon.ico2014-06-12T15:09:34ZQGIS Issue TrackingQGIS Application - Feature request #6801: add "dissolve only adjacent" dissolve option/toolhttps://issues.qgis.org/issues/6801?journal_id=520212014-06-12T15:09:34ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Priority</strong> changed from <i>High</i> to <i>Normal</i></li></ul> QGIS Application - Feature request #6801: add "dissolve only adjacent" dissolve option/toolhttps://issues.qgis.org/issues/6801?journal_id=525072014-06-20T07:40:29ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Category</strong> changed from <i>44</i> to <i>94</i></li><li><strong>Subject</strong> changed from <i>add "dissolve only adjacent" option to dissolve tool</i> to <i>add "dissolve only adjacent" dissolve option/tool</i></li><li><strong>Assignee</strong> set to <i>Victor Olaya</i></li></ul><p>adding this options in ftools (or gdal tools) does not make a lot of sense anymore, better add them directly in processing.</p> QGIS Application - Feature request #6801: add "dissolve only adjacent" dissolve option/toolhttps://issues.qgis.org/issues/6801?journal_id=576702014-11-22T00:32:08ZAlexander Bruy
<ul><li><strong>Category</strong> changed from <i>94</i> to <i>Processing/QGIS</i></li></ul> QGIS Application - Feature request #6801: add "dissolve only adjacent" dissolve option/toolhttps://issues.qgis.org/issues/6801?journal_id=577292014-11-23T09:27:59ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/download/8123/diss2.png">diss2.png</a> added</li><li><strong>Assignee</strong> changed from <i>Victor Olaya</i> to <i>Giovanni Manghi</i></li><li><strong>Category</strong> changed from <i>Processing/QGIS</i> to <i>Processing/GDAL</i></li><li><strong>File</strong> <a href="/attachments/download/8124/diss3.png">diss3.png</a> added</li><li><strong>File</strong> <a href="/attachments/download/8122/diss1.png">diss1.png</a> added</li></ul><p>To add this tool it can be used a sql only approach, via ogr2ogr/processing, so I should be able to give it a shot.</p>
<p>A possible query is</p>
<p>SELECT<br /> ST_Union(geom) AS geom,<br /> a.diss_field,<br /> null AS oth_field,<br /> <abbr title="area_ha">SUM</abbr> AS area_ha<br />FROM<br /> input a<br />WHERE<br /> EXISTS (SELECT id_0 FROM input b WHERE b.id_0 != a.id_0 AND (ST_Intersects(a.geom, b.geom))) GROUP BY a.diss_field<br />UNION<br />SELECT<br /> geom,<br /> diss_field,<br /> oth_field,<br /> area_ha<br />FROM<br /> input a<br />WHERE<br /> NOT EXISTS (SELECT id_0 FROM input b WHERE b.id_0 != a.id_0 AND (ST_Intersects(a.geom, b.geom)))</p>
<p>where "oth_field" is the field to be kept untouched in non dissolved features, "diss_field" is the attribute used to dissolve adjacent features and "area_ha" a numeric field where to eventually compute an aggregation stat in dissolve features (and to be kept untouched in non dissolved features).</p>
<p>A slightly different case is when not only physically isolated features are not meant to be dissolved, but also when features that have only neighbours with a different dissolve field are not meant to be dissolved.</p>
<p>SELECT<br /> ST_Union(geom) AS geom,<br /> a.diss_field,<br /> null AS oth_field,<br /> <abbr title="area_ha">SUM</abbr> AS area_ha<br />FROM<br /> input a<br />WHERE<br /> EXISTS (SELECT id_0 FROM input b WHERE b.id_0 != a.id_0 AND (ST_Intersects(a.geom, b.geom)) and b.diss_field = a.diss_field) GROUP BY a.diss_field<br />UNION<br />SELECT<br /> geom,<br /> diss_field,<br /> oth_field,<br /> area_ha<br />FROM<br /> input a<br />WHERE<br /> NOT EXISTS (SELECT id_0 FROM input b WHERE b.id_0 != a.id_0 AND (ST_Intersects(a.geom, b.geom)) and b.diss_field = a.diss_field)</p>
<p>3 pictures are attached to understand better.</p> QGIS Application - Feature request #6801: add "dissolve only adjacent" dissolve option/toolhttps://issues.qgis.org/issues/6801?journal_id=648112015-10-22T04:45:35ZBernhard Ströblbernhard.stroebl@jena.de
<ul></ul><p>I included this issue in <a class="issue tracker-2 status-1 priority-4 priority-" href="https://issues.qgis.org/issues/13654" title="Enhancements to Dissolve (Open)">#13654</a>, please consider closing this ticket if appropriate.</p> QGIS Application - Feature request #6801: add "dissolve only adjacent" dissolve option/toolhttps://issues.qgis.org/issues/6801?journal_id=648152015-10-22T05:01:39ZGiovanni Manghigiovanni.manghi@gmail.com
<ul></ul><p>Hi Bernhard,</p>
<p>I will add ogr/sql tools regardless of the work being done in native qgis tools, for several reasons: I like the flexibility of having GUI tools purely based on spatial SQL queries and because the tools already available have proven to be overall much quicker than the qgis/ftools counterparts. Cheers!</p> QGIS Application - Feature request #6801: add "dissolve only adjacent" dissolve option/toolhttps://issues.qgis.org/issues/6801?journal_id=769022017-04-30T22:48:24ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Easy fix?</strong> set to <i>No</i></li></ul>