<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi Bernhard,</p>
<p>Ah - now I understand it - before feeding the polygons into the "Eliminate selected polygons" I should only select the overlapping ones detected by the Union (e.g. by using the "select by attribute" algorihm) - and not all polygons in the layer. Makes sense. The algorithm will then merge these subselects to their neighbours matching either largest or smalllest area or common boundary. Will give it a try.</p>
<p>Otherwise, the "eliminate selected polygons" sounds interesting in more "interactive", semi-automated workflow.</p>
<p>Thanks,</p>
<p>Andreas</p>
<p id="reply-intro">On 2023-07-26 15:22, Bernhard Ströbl via QGIS-User wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Hi Andreas,<br /><br />I would like to give some explanations on your comment concerning the eliminate algorithm: During development the goal was to have a method that can get rid of sliver polygons (I explained my workflow for detecting them in my previous post). The algorithm simply merges the selected polygons with their specified neighbours. The attribute values of the neighbour stay as they are. What would you expect attributewise? Furthermore no definition of the polygons to eliminate is defined in the code thus it is up to the user to decide which polygons should go, hence it works on the selection. Making a tool that merely eliminates all overlaps would be a different task. The eliminate tool as it is has a broader use range, examples: You can only eliminate certain overlaps while keeping others. You can use it to generalize by getting rid of polygons smaller than a certain size. You have landuse data that contains polygons for a river but you want to use lines for the river, so get rid of all river polygons....<br /><br />regards <br /><br />Bernhard<br /><br />
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">Andreas Neumann via QGIS-User <<a href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a>> hat am 26.07.2023 14:15 CEST geschrieben:<br /><br /> <br />Hi,<br /><br />Thank you all for your feedback!<br /><br />@Nyall - the GEOS/JTS capabilities for cleaning and validating geometries<br />look definitely interesting. Something for an upcoming QGIS-CH grant<br />perhaps ...<br /><br />@Bernhard - I also had a look at and tested the "Eliminate selected<br />polygons" algorithm - but it doesn't have a way to specify attribute<br />handling nor grouping - and it is also strange that I have to select the<br />polygons first and cannot run the algorithm on the whole data set as is<br /><br />About SAGA: I couldn't get the SAGA stuff to work anymore<br />About GRASS: it could be an option, but a native solution in QGIS would be<br />preferred<br /><br />So in summary: there are several options around for cleaning overlaps - but<br />it isn't as straight-forward and user friendly yet as it could/should be.<br /><br />I haven't looked at the gaps yet ...<br /><br />Thank you all and greetings,<br />Andreas<br /><br /><br />On Tue, 25 Jul 2023 at 13:13, Bernhard Ströbl via QGIS-User <<br /><a href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a>> wrote:<br /><br />
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">Hi Andreas,<br /><br />the Algorithm "Eliminate selected polygons" was originally created to<br />address these questions. I usually imported the data into GRASS ran a clean<br />there and reexported the results into a non topolgical dataset. Thus<br />overlapping areas and gaps (only if closed) are identified and can be<br />eliminated using the algorithm named above (selecting only a certain<br />area-circumference relation) by merging it with the adjacent polygon with<br />the smallest/largest area or the longest common boundary.<br />For your case you could have used this algorithm after the union to<br />identify overlaps.<br />As for an algorithm that does all this in one go: You would need something<br />that detects holes between polygons without the help of a toplogical data<br />format.<br /><br />regards<br />Bernhard<br /><br />
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">Andreas Neumann via QGIS-User <<a href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a>> hat am</blockquote>
25.07.2023 12:01 CEST geschrieben:
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"><br /><br />Hi,<br /><br />A friend of mine has a dirty input data set with lots of overlapping<br />geometries (within the same layer) and asked me if there is a tool<br />within QGIS to automatically remove the overlaps and assign the<br />overlapping area to the neighbor polygon with the largest area.<br /><br />The solution was surprisingly hard to find, although I am pretty sure<br />there are multiple combinations of algorithms that would solve the<br />problem. Here is the solution I came up with:<br /><a href="https://github.com/qgis-ch/overlap_removal/tree/main" target="_blank" rel="noopener noreferrer">https://github.com/qgis-ch/overlap_removal/tree/main</a> [1]- perhaps you<br />have better ideas - more elegant solutions?<br /><br />Wouldn't it be great if QGIS had a processing tool to solve this overlap<br />cleaning within the same layer "out of the box" without having to use a<br />graphical model or a more or less complicated sequence of algorithms in<br />the processing toolbox? Apparently, ArcGIS has such a tool ...<br /><br />Saga and GRASS also might have such tools - but I couldn't get the SAGA<br />based QGIS plugin "Dissect and dissolve overlaps"<br />(<a href="https://plugins.qgis.org/plugins/dissect_dissolve_overlaps" target="_blank" rel="noopener noreferrer">https://plugins.qgis.org/plugins/dissect_dissolve_overlaps</a>).<br /><br />The same problem exists for automatically filling small gaps in the<br />polygon data set ...<br /><br />Andreas<br /><br /><br /><br />Links:<br />------<br />[1]</blockquote>
<a href="https://github.com/qgis-ch/overlap_removal/tree/main_______________________________________________" target="_blank" rel="noopener noreferrer">https://github.com/qgis-ch/overlap_removal/tree/main_______________________________________________</a>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">QGIS-User mailing list<br /><a href="mailto:QGIS-User@lists.osgeo.org">QGIS-User@lists.osgeo.org</a><br />List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br />Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></blockquote>
_______________________________________________<br />QGIS-User mailing list<br /><a href="mailto:QGIS-User@lists.osgeo.org">QGIS-User@lists.osgeo.org</a><br />List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br />Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br /><br /></blockquote>
<br /><br /><span class="sig">-- <br /><br />--<br />Andreas Neumann<br />QGIS.ORG board member (treasurer)<br />_______________________________________________<br />QGIS-User mailing list<br /><a href="mailto:QGIS-User@lists.osgeo.org">QGIS-User@lists.osgeo.org</a><br />List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br />Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></span></blockquote>
_______________________________________________<br />QGIS-User mailing list<br /><a href="mailto:QGIS-User@lists.osgeo.org">QGIS-User@lists.osgeo.org</a><br />List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br />Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></div>
</blockquote>
<p><br /></p>
</body></html>