Finding overlapping areas in same polygon layer using QGIS?
Clash Royale CLAN TAG#URR8PPP
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
add a comment |
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
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
add a comment |
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
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
qgis overlapping-features
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
add a comment |
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
add a comment |
3 Answers
3
active
oldest
votes
QGIS 3.4
- Make sure your polygon layer has a unique id field, such as
id
orfid
. - Run Union tool (
Processing Toolbox > Vector overlay
). It will return a newUnion
layer. - 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"
.
Thanks very much! This works perfect and was just what i needed.
– Koen Venken
Feb 12 at 14:26
add a comment |
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.
add a comment |
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...)
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
QGIS 3.4
- Make sure your polygon layer has a unique id field, such as
id
orfid
. - Run Union tool (
Processing Toolbox > Vector overlay
). It will return a newUnion
layer. - 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"
.
Thanks very much! This works perfect and was just what i needed.
– Koen Venken
Feb 12 at 14:26
add a comment |
QGIS 3.4
- Make sure your polygon layer has a unique id field, such as
id
orfid
. - Run Union tool (
Processing Toolbox > Vector overlay
). It will return a newUnion
layer. - 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"
.
Thanks very much! This works perfect and was just what i needed.
– Koen Venken
Feb 12 at 14:26
add a comment |
QGIS 3.4
- Make sure your polygon layer has a unique id field, such as
id
orfid
. - Run Union tool (
Processing Toolbox > Vector overlay
). It will return a newUnion
layer. - 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"
.
QGIS 3.4
- Make sure your polygon layer has a unique id field, such as
id
orfid
. - Run Union tool (
Processing Toolbox > Vector overlay
). It will return a newUnion
layer. - 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"
.
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
add a comment |
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
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
edited Feb 12 at 12:52
answered Feb 12 at 12:31
snaileatersnaileater
1,392612
1,392612
add a comment |
add a comment |
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...)
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
add a comment |
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...)
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
add a comment |
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...)
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...)
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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