Finding overlapping areas in same polygon layer using QGIS?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












4















I'm working with QGIS to find overlapping area's in a polygon layer.



Some more info :
The Layers contains multiple circles ( buffers ) and i need to find where there is an overlapping area of 3 or more circles. And based on how many circles overlap they have to get a different color / style.



Does anybody know a fast workflow for this?










share|improve this question
























  • Do your buffers have known and constant diameters ?

    – snaileater
    Feb 12 at 9:44











  • Yes, 750m radius

    – Koen Venken
    Feb 12 at 9:46











  • If it's only for styling (ie. you don't need the number of overlap recorded in the table) you can play with the styling option "feature blending mode" (it's in the layer rendering part) for exemple setting it to multiply give you darker shade the more overlaping feature you have

    – J.R
    Feb 12 at 10:00











  • That's usefull but it would be ideal to have the number of overlap in the record table.

    – Koen Venken
    Feb 12 at 10:11






  • 1





    you could rasterize the layers and burn the sum into the raster layer. Then separate the buffers at intersection and perform a raster statistic with the zonal statistics tool

    – Leo
    Feb 12 at 12:10















4















I'm working with QGIS to find overlapping area's in a polygon layer.



Some more info :
The Layers contains multiple circles ( buffers ) and i need to find where there is an overlapping area of 3 or more circles. And based on how many circles overlap they have to get a different color / style.



Does anybody know a fast workflow for this?










share|improve this question
























  • Do your buffers have known and constant diameters ?

    – snaileater
    Feb 12 at 9:44











  • Yes, 750m radius

    – Koen Venken
    Feb 12 at 9:46











  • If it's only for styling (ie. you don't need the number of overlap recorded in the table) you can play with the styling option "feature blending mode" (it's in the layer rendering part) for exemple setting it to multiply give you darker shade the more overlaping feature you have

    – J.R
    Feb 12 at 10:00











  • That's usefull but it would be ideal to have the number of overlap in the record table.

    – Koen Venken
    Feb 12 at 10:11






  • 1





    you could rasterize the layers and burn the sum into the raster layer. Then separate the buffers at intersection and perform a raster statistic with the zonal statistics tool

    – Leo
    Feb 12 at 12:10













4












4








4








I'm working with QGIS to find overlapping area's in a polygon layer.



Some more info :
The Layers contains multiple circles ( buffers ) and i need to find where there is an overlapping area of 3 or more circles. And based on how many circles overlap they have to get a different color / style.



Does anybody know a fast workflow for this?










share|improve this question
















I'm working with QGIS to find overlapping area's in a polygon layer.



Some more info :
The Layers contains multiple circles ( buffers ) and i need to find where there is an overlapping area of 3 or more circles. And based on how many circles overlap they have to get a different color / style.



Does anybody know a fast workflow for this?







qgis overlapping-features






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 12 at 11:49









PolyGeo

53.6k1781242




53.6k1781242










asked Feb 12 at 9:35









Koen VenkenKoen Venken

284




284












  • Do your buffers have known and constant diameters ?

    – snaileater
    Feb 12 at 9:44











  • Yes, 750m radius

    – Koen Venken
    Feb 12 at 9:46











  • If it's only for styling (ie. you don't need the number of overlap recorded in the table) you can play with the styling option "feature blending mode" (it's in the layer rendering part) for exemple setting it to multiply give you darker shade the more overlaping feature you have

    – J.R
    Feb 12 at 10:00











  • That's usefull but it would be ideal to have the number of overlap in the record table.

    – Koen Venken
    Feb 12 at 10:11






  • 1





    you could rasterize the layers and burn the sum into the raster layer. Then separate the buffers at intersection and perform a raster statistic with the zonal statistics tool

    – Leo
    Feb 12 at 12:10

















  • Do your buffers have known and constant diameters ?

    – snaileater
    Feb 12 at 9:44











  • Yes, 750m radius

    – Koen Venken
    Feb 12 at 9:46











  • If it's only for styling (ie. you don't need the number of overlap recorded in the table) you can play with the styling option "feature blending mode" (it's in the layer rendering part) for exemple setting it to multiply give you darker shade the more overlaping feature you have

    – J.R
    Feb 12 at 10:00











  • That's usefull but it would be ideal to have the number of overlap in the record table.

    – Koen Venken
    Feb 12 at 10:11






  • 1





    you could rasterize the layers and burn the sum into the raster layer. Then separate the buffers at intersection and perform a raster statistic with the zonal statistics tool

    – Leo
    Feb 12 at 12:10
















Do your buffers have known and constant diameters ?

– snaileater
Feb 12 at 9:44





Do your buffers have known and constant diameters ?

– snaileater
Feb 12 at 9:44













Yes, 750m radius

– Koen Venken
Feb 12 at 9:46





Yes, 750m radius

– Koen Venken
Feb 12 at 9:46













If it's only for styling (ie. you don't need the number of overlap recorded in the table) you can play with the styling option "feature blending mode" (it's in the layer rendering part) for exemple setting it to multiply give you darker shade the more overlaping feature you have

– J.R
Feb 12 at 10:00





If it's only for styling (ie. you don't need the number of overlap recorded in the table) you can play with the styling option "feature blending mode" (it's in the layer rendering part) for exemple setting it to multiply give you darker shade the more overlaping feature you have

– J.R
Feb 12 at 10:00













That's usefull but it would be ideal to have the number of overlap in the record table.

– Koen Venken
Feb 12 at 10:11





That's usefull but it would be ideal to have the number of overlap in the record table.

– Koen Venken
Feb 12 at 10:11




1




1





you could rasterize the layers and burn the sum into the raster layer. Then separate the buffers at intersection and perform a raster statistic with the zonal statistics tool

– Leo
Feb 12 at 12:10





you could rasterize the layers and burn the sum into the raster layer. Then separate the buffers at intersection and perform a raster statistic with the zonal statistics tool

– Leo
Feb 12 at 12:10










3 Answers
3






active

oldest

votes


















4














QGIS 3.4



  1. Make sure your polygon layer has a unique id field, such as id or fid.

  2. Run Union tool (Processing Toolbox > Vector overlay). It will return a new Union layer.

  3. Open the attribute table of this Union layer, and create an integer field with an expression as below: count("id", group_by:=geom_to_wkt($geometry)) ...... if your id field name is "id".

enter image description here






share|improve this answer

























  • Thanks very much! This works perfect and was just what i needed.

    – Koen Venken
    Feb 12 at 14:26


















3














In Database/DB Manager/Virtual layers/Qgis layers you're able to execute the following query (you'll have to adapt the column names...) :



with a as (select * from buffer_table)
select to_real(buffer_table.id) id, count(*) nb from buffer_table,a
where st_intersects(buffer_table.geometry, a.geometry) and a.id<>buffer_table.id
group by buffer_table.id


You load this table and save it in QGIS and join the result to your buffer_table and then you can use the nb column to label or style your buffer objects.






share|improve this answer
































    1














    Try this:
    Processing toolbox - SAGA self intersection
    your result will like 1|5|7 and so one



    via DB manger/SQL you can make a query to "count" '|' as indicator for the number of overlaps:



    Create table test_count3 as
    select length("ID")-length(replace("ID",'|','')) as test, ogc_fid
    FROM test_split
    END



    join this layer to your self intersection layer via ogc_fid and style it as categorized with the "test" column
    (But I am sure there is a more elegant way, however it seems to work...)
    enter image description here






    share|improve this answer























    • when did this algorithm appear ?

      – snaileater
      Feb 12 at 12:52











    • don't know stumbled upon it a few days ago, when i had a similar problem.

      – user16032
      Feb 12 at 12:56










    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%2f311848%2ffinding-overlapping-areas-in-same-polygon-layer-using-qgis%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









    4














    QGIS 3.4



    1. Make sure your polygon layer has a unique id field, such as id or fid.

    2. Run Union tool (Processing Toolbox > Vector overlay). It will return a new Union layer.

    3. Open the attribute table of this Union layer, and create an integer field with an expression as below: count("id", group_by:=geom_to_wkt($geometry)) ...... if your id field name is "id".

    enter image description here






    share|improve this answer

























    • Thanks very much! This works perfect and was just what i needed.

      – Koen Venken
      Feb 12 at 14:26















    4














    QGIS 3.4



    1. Make sure your polygon layer has a unique id field, such as id or fid.

    2. Run Union tool (Processing Toolbox > Vector overlay). It will return a new Union layer.

    3. Open the attribute table of this Union layer, and create an integer field with an expression as below: count("id", group_by:=geom_to_wkt($geometry)) ...... if your id field name is "id".

    enter image description here






    share|improve this answer

























    • Thanks very much! This works perfect and was just what i needed.

      – Koen Venken
      Feb 12 at 14:26













    4












    4








    4







    QGIS 3.4



    1. Make sure your polygon layer has a unique id field, such as id or fid.

    2. Run Union tool (Processing Toolbox > Vector overlay). It will return a new Union layer.

    3. Open the attribute table of this Union layer, and create an integer field with an expression as below: count("id", group_by:=geom_to_wkt($geometry)) ...... if your id field name is "id".

    enter image description here






    share|improve this answer















    QGIS 3.4



    1. Make sure your polygon layer has a unique id field, such as id or fid.

    2. Run Union tool (Processing Toolbox > Vector overlay). It will return a new Union layer.

    3. Open the attribute table of this Union layer, and create an integer field with an expression as below: count("id", group_by:=geom_to_wkt($geometry)) ...... if your id field name is "id".

    enter image description here







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Feb 12 at 13:01

























    answered Feb 12 at 12:30









    KazuhitoKazuhito

    16k41883




    16k41883












    • Thanks very much! This works perfect and was just what i needed.

      – Koen Venken
      Feb 12 at 14:26

















    • Thanks very much! This works perfect and was just what i needed.

      – Koen Venken
      Feb 12 at 14:26
















    Thanks very much! This works perfect and was just what i needed.

    – Koen Venken
    Feb 12 at 14:26





    Thanks very much! This works perfect and was just what i needed.

    – Koen Venken
    Feb 12 at 14:26













    3














    In Database/DB Manager/Virtual layers/Qgis layers you're able to execute the following query (you'll have to adapt the column names...) :



    with a as (select * from buffer_table)
    select to_real(buffer_table.id) id, count(*) nb from buffer_table,a
    where st_intersects(buffer_table.geometry, a.geometry) and a.id<>buffer_table.id
    group by buffer_table.id


    You load this table and save it in QGIS and join the result to your buffer_table and then you can use the nb column to label or style your buffer objects.






    share|improve this answer





























      3














      In Database/DB Manager/Virtual layers/Qgis layers you're able to execute the following query (you'll have to adapt the column names...) :



      with a as (select * from buffer_table)
      select to_real(buffer_table.id) id, count(*) nb from buffer_table,a
      where st_intersects(buffer_table.geometry, a.geometry) and a.id<>buffer_table.id
      group by buffer_table.id


      You load this table and save it in QGIS and join the result to your buffer_table and then you can use the nb column to label or style your buffer objects.






      share|improve this answer



























        3












        3








        3







        In Database/DB Manager/Virtual layers/Qgis layers you're able to execute the following query (you'll have to adapt the column names...) :



        with a as (select * from buffer_table)
        select to_real(buffer_table.id) id, count(*) nb from buffer_table,a
        where st_intersects(buffer_table.geometry, a.geometry) and a.id<>buffer_table.id
        group by buffer_table.id


        You load this table and save it in QGIS and join the result to your buffer_table and then you can use the nb column to label or style your buffer objects.






        share|improve this answer















        In Database/DB Manager/Virtual layers/Qgis layers you're able to execute the following query (you'll have to adapt the column names...) :



        with a as (select * from buffer_table)
        select to_real(buffer_table.id) id, count(*) nb from buffer_table,a
        where st_intersects(buffer_table.geometry, a.geometry) and a.id<>buffer_table.id
        group by buffer_table.id


        You load this table and save it in QGIS and join the result to your buffer_table and then you can use the nb column to label or style your buffer objects.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Feb 12 at 12:52

























        answered Feb 12 at 12:31









        snaileatersnaileater

        1,392612




        1,392612





















            1














            Try this:
            Processing toolbox - SAGA self intersection
            your result will like 1|5|7 and so one



            via DB manger/SQL you can make a query to "count" '|' as indicator for the number of overlaps:



            Create table test_count3 as
            select length("ID")-length(replace("ID",'|','')) as test, ogc_fid
            FROM test_split
            END



            join this layer to your self intersection layer via ogc_fid and style it as categorized with the "test" column
            (But I am sure there is a more elegant way, however it seems to work...)
            enter image description here






            share|improve this answer























            • when did this algorithm appear ?

              – snaileater
              Feb 12 at 12:52











            • don't know stumbled upon it a few days ago, when i had a similar problem.

              – user16032
              Feb 12 at 12:56















            1














            Try this:
            Processing toolbox - SAGA self intersection
            your result will like 1|5|7 and so one



            via DB manger/SQL you can make a query to "count" '|' as indicator for the number of overlaps:



            Create table test_count3 as
            select length("ID")-length(replace("ID",'|','')) as test, ogc_fid
            FROM test_split
            END



            join this layer to your self intersection layer via ogc_fid and style it as categorized with the "test" column
            (But I am sure there is a more elegant way, however it seems to work...)
            enter image description here






            share|improve this answer























            • when did this algorithm appear ?

              – snaileater
              Feb 12 at 12:52











            • don't know stumbled upon it a few days ago, when i had a similar problem.

              – user16032
              Feb 12 at 12:56













            1












            1








            1







            Try this:
            Processing toolbox - SAGA self intersection
            your result will like 1|5|7 and so one



            via DB manger/SQL you can make a query to "count" '|' as indicator for the number of overlaps:



            Create table test_count3 as
            select length("ID")-length(replace("ID",'|','')) as test, ogc_fid
            FROM test_split
            END



            join this layer to your self intersection layer via ogc_fid and style it as categorized with the "test" column
            (But I am sure there is a more elegant way, however it seems to work...)
            enter image description here






            share|improve this answer













            Try this:
            Processing toolbox - SAGA self intersection
            your result will like 1|5|7 and so one



            via DB manger/SQL you can make a query to "count" '|' as indicator for the number of overlaps:



            Create table test_count3 as
            select length("ID")-length(replace("ID",'|','')) as test, ogc_fid
            FROM test_split
            END



            join this layer to your self intersection layer via ogc_fid and style it as categorized with the "test" column
            (But I am sure there is a more elegant way, however it seems to work...)
            enter image description here







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Feb 12 at 12:44









            user16032user16032

            499515




            499515












            • when did this algorithm appear ?

              – snaileater
              Feb 12 at 12:52











            • don't know stumbled upon it a few days ago, when i had a similar problem.

              – user16032
              Feb 12 at 12:56

















            • when did this algorithm appear ?

              – snaileater
              Feb 12 at 12:52











            • don't know stumbled upon it a few days ago, when i had a similar problem.

              – user16032
              Feb 12 at 12:56
















            when did this algorithm appear ?

            – snaileater
            Feb 12 at 12:52





            when did this algorithm appear ?

            – snaileater
            Feb 12 at 12:52













            don't know stumbled upon it a few days ago, when i had a similar problem.

            – user16032
            Feb 12 at 12:56





            don't know stumbled upon it a few days ago, when i had a similar problem.

            – user16032
            Feb 12 at 12:56

















            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%2f311848%2ffinding-overlapping-areas-in-same-polygon-layer-using-qgis%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

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay