Using QGIS to remove portions of polygons that overlap in same layer?












5















Is there a way to easily eliminate the overlapping portions of polygons in the same layer?



For example, I want to turn this



enter image description here



into this



enter image description here



I used Union to break the polygons apart where they overlapped, and then used Delete Duplicate Geometries to get rid of half the overlaps, but still had to manually delete the others. That's fine for the example, but won't work with the large amount of polygons that will be in the real data.










share|improve this question




















  • 1





    Thank you for including "before" and "after" images of what you're trying to achieve. It made your question easy to understand.

    – csk
    Jan 25 at 20:58
















5















Is there a way to easily eliminate the overlapping portions of polygons in the same layer?



For example, I want to turn this



enter image description here



into this



enter image description here



I used Union to break the polygons apart where they overlapped, and then used Delete Duplicate Geometries to get rid of half the overlaps, but still had to manually delete the others. That's fine for the example, but won't work with the large amount of polygons that will be in the real data.










share|improve this question




















  • 1





    Thank you for including "before" and "after" images of what you're trying to achieve. It made your question easy to understand.

    – csk
    Jan 25 at 20:58














5












5








5


1






Is there a way to easily eliminate the overlapping portions of polygons in the same layer?



For example, I want to turn this



enter image description here



into this



enter image description here



I used Union to break the polygons apart where they overlapped, and then used Delete Duplicate Geometries to get rid of half the overlaps, but still had to manually delete the others. That's fine for the example, but won't work with the large amount of polygons that will be in the real data.










share|improve this question
















Is there a way to easily eliminate the overlapping portions of polygons in the same layer?



For example, I want to turn this



enter image description here



into this



enter image description here



I used Union to break the polygons apart where they overlapped, and then used Delete Duplicate Geometries to get rid of half the overlaps, but still had to manually delete the others. That's fine for the example, but won't work with the large amount of polygons that will be in the real data.







qgis overlapping-features






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 29 at 23:15









PolyGeo

53.7k1781244




53.7k1781244










asked Jan 25 at 20:42









ChadChad

283




283








  • 1





    Thank you for including "before" and "after" images of what you're trying to achieve. It made your question easy to understand.

    – csk
    Jan 25 at 20:58














  • 1





    Thank you for including "before" and "after" images of what you're trying to achieve. It made your question easy to understand.

    – csk
    Jan 25 at 20:58








1




1





Thank you for including "before" and "after" images of what you're trying to achieve. It made your question easy to understand.

– csk
Jan 25 at 20:58





Thank you for including "before" and "after" images of what you're trying to achieve. It made your question easy to understand.

– csk
Jan 25 at 20:58










3 Answers
3






active

oldest

votes


















5














QGIS Processing Toolbox has a SAGA Polygon self-intersection tool (under SAGA | Vector polygon tools).



It works much like QIGS Union Tool, while this tool retains only one feature per the overlapped area.



Open the attribute table of generated Intersection layer and select Delete all features whose fid (or id) is 0.



enter image description here






share|improve this answer

































    3














    Just to add another workaround with QGIS built-in functions:





    • Intersect the polygons layer against itself.


    The output is an Intersection layer with all the geometries of the polygons layer and new geometries for their overlapped areas.





    • Select by location the geometries of the Intersection layer than are equal (parameter) to polygons layer geometries, and Delete them.


    The output is, in the same Intersection layer, two or more geometries for any overlap in the polygons layer.




    • Make the Difference between the polygons layer and the edited Intersection layer.


    The output is a new Difference layer, with the geometries of the polygons layer without the overlapped areas.






    share|improve this answer































      2














      Use the Symmetrical Difference tool.



      enter image description here




      Symmetrical difference



      This algorithm extracts the portions of features from both the Input and Overlay layers that do not overlap. Overlapping areas between the two layers are removed. The attribute table of the Symmetrical Difference layer contains original attributes from both the Input and Difference layers.







      share|improve this answer
























      • Thanks for the help. But does this only work if they are in different layers? When I tried it, I got a blank layer. All the overlapping features will be in the same layer.

        – Chad
        Jan 25 at 22:39











      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "79"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f309950%2fusing-qgis-to-remove-portions-of-polygons-that-overlap-in-same-layer%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      5














      QGIS Processing Toolbox has a SAGA Polygon self-intersection tool (under SAGA | Vector polygon tools).



      It works much like QIGS Union Tool, while this tool retains only one feature per the overlapped area.



      Open the attribute table of generated Intersection layer and select Delete all features whose fid (or id) is 0.



      enter image description here






      share|improve this answer






























        5














        QGIS Processing Toolbox has a SAGA Polygon self-intersection tool (under SAGA | Vector polygon tools).



        It works much like QIGS Union Tool, while this tool retains only one feature per the overlapped area.



        Open the attribute table of generated Intersection layer and select Delete all features whose fid (or id) is 0.



        enter image description here






        share|improve this answer




























          5












          5








          5







          QGIS Processing Toolbox has a SAGA Polygon self-intersection tool (under SAGA | Vector polygon tools).



          It works much like QIGS Union Tool, while this tool retains only one feature per the overlapped area.



          Open the attribute table of generated Intersection layer and select Delete all features whose fid (or id) is 0.



          enter image description here






          share|improve this answer















          QGIS Processing Toolbox has a SAGA Polygon self-intersection tool (under SAGA | Vector polygon tools).



          It works much like QIGS Union Tool, while this tool retains only one feature per the overlapped area.



          Open the attribute table of generated Intersection layer and select Delete all features whose fid (or id) is 0.



          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 26 at 1:27

























          answered Jan 26 at 0:35









          KazuhitoKazuhito

          16.2k41884




          16.2k41884

























              3














              Just to add another workaround with QGIS built-in functions:





              • Intersect the polygons layer against itself.


              The output is an Intersection layer with all the geometries of the polygons layer and new geometries for their overlapped areas.





              • Select by location the geometries of the Intersection layer than are equal (parameter) to polygons layer geometries, and Delete them.


              The output is, in the same Intersection layer, two or more geometries for any overlap in the polygons layer.




              • Make the Difference between the polygons layer and the edited Intersection layer.


              The output is a new Difference layer, with the geometries of the polygons layer without the overlapped areas.






              share|improve this answer




























                3














                Just to add another workaround with QGIS built-in functions:





                • Intersect the polygons layer against itself.


                The output is an Intersection layer with all the geometries of the polygons layer and new geometries for their overlapped areas.





                • Select by location the geometries of the Intersection layer than are equal (parameter) to polygons layer geometries, and Delete them.


                The output is, in the same Intersection layer, two or more geometries for any overlap in the polygons layer.




                • Make the Difference between the polygons layer and the edited Intersection layer.


                The output is a new Difference layer, with the geometries of the polygons layer without the overlapped areas.






                share|improve this answer


























                  3












                  3








                  3







                  Just to add another workaround with QGIS built-in functions:





                  • Intersect the polygons layer against itself.


                  The output is an Intersection layer with all the geometries of the polygons layer and new geometries for their overlapped areas.





                  • Select by location the geometries of the Intersection layer than are equal (parameter) to polygons layer geometries, and Delete them.


                  The output is, in the same Intersection layer, two or more geometries for any overlap in the polygons layer.




                  • Make the Difference between the polygons layer and the edited Intersection layer.


                  The output is a new Difference layer, with the geometries of the polygons layer without the overlapped areas.






                  share|improve this answer













                  Just to add another workaround with QGIS built-in functions:





                  • Intersect the polygons layer against itself.


                  The output is an Intersection layer with all the geometries of the polygons layer and new geometries for their overlapped areas.





                  • Select by location the geometries of the Intersection layer than are equal (parameter) to polygons layer geometries, and Delete them.


                  The output is, in the same Intersection layer, two or more geometries for any overlap in the polygons layer.




                  • Make the Difference between the polygons layer and the edited Intersection layer.


                  The output is a new Difference layer, with the geometries of the polygons layer without the overlapped areas.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jan 26 at 2:24









                  Gabriel De LucaGabriel De Luca

                  3,1581220




                  3,1581220























                      2














                      Use the Symmetrical Difference tool.



                      enter image description here




                      Symmetrical difference



                      This algorithm extracts the portions of features from both the Input and Overlay layers that do not overlap. Overlapping areas between the two layers are removed. The attribute table of the Symmetrical Difference layer contains original attributes from both the Input and Difference layers.







                      share|improve this answer
























                      • Thanks for the help. But does this only work if they are in different layers? When I tried it, I got a blank layer. All the overlapping features will be in the same layer.

                        – Chad
                        Jan 25 at 22:39
















                      2














                      Use the Symmetrical Difference tool.



                      enter image description here




                      Symmetrical difference



                      This algorithm extracts the portions of features from both the Input and Overlay layers that do not overlap. Overlapping areas between the two layers are removed. The attribute table of the Symmetrical Difference layer contains original attributes from both the Input and Difference layers.







                      share|improve this answer
























                      • Thanks for the help. But does this only work if they are in different layers? When I tried it, I got a blank layer. All the overlapping features will be in the same layer.

                        – Chad
                        Jan 25 at 22:39














                      2












                      2








                      2







                      Use the Symmetrical Difference tool.



                      enter image description here




                      Symmetrical difference



                      This algorithm extracts the portions of features from both the Input and Overlay layers that do not overlap. Overlapping areas between the two layers are removed. The attribute table of the Symmetrical Difference layer contains original attributes from both the Input and Difference layers.







                      share|improve this answer













                      Use the Symmetrical Difference tool.



                      enter image description here




                      Symmetrical difference



                      This algorithm extracts the portions of features from both the Input and Overlay layers that do not overlap. Overlapping areas between the two layers are removed. The attribute table of the Symmetrical Difference layer contains original attributes from both the Input and Difference layers.








                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Jan 25 at 20:55









                      cskcsk

                      9,1451035




                      9,1451035













                      • Thanks for the help. But does this only work if they are in different layers? When I tried it, I got a blank layer. All the overlapping features will be in the same layer.

                        – Chad
                        Jan 25 at 22:39



















                      • Thanks for the help. But does this only work if they are in different layers? When I tried it, I got a blank layer. All the overlapping features will be in the same layer.

                        – Chad
                        Jan 25 at 22:39

















                      Thanks for the help. But does this only work if they are in different layers? When I tried it, I got a blank layer. All the overlapping features will be in the same layer.

                      – Chad
                      Jan 25 at 22:39





                      Thanks for the help. But does this only work if they are in different layers? When I tried it, I got a blank layer. All the overlapping features will be in the same layer.

                      – Chad
                      Jan 25 at 22:39


















                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f309950%2fusing-qgis-to-remove-portions-of-polygons-that-overlap-in-same-layer%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      MongoDB - Not Authorized To Execute Command

                      How to fix TextFormField cause rebuild widget in Flutter

                      in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith