How to divide a buffer using geometry generator in QGIS 3.X
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
Some background and working PostGIS query and Python script available here.
How to split circles in 12 sections in PostGIS?
I don't want to create a new polygon layer out of points. I really like QGIS Geometry generator. My idea is to use QGIS Geometry generator and show this divide buffer as symbol.
Any suggestion?
qgis symbology geometry-generator
add a comment |
Some background and working PostGIS query and Python script available here.
How to split circles in 12 sections in PostGIS?
I don't want to create a new polygon layer out of points. I really like QGIS Geometry generator. My idea is to use QGIS Geometry generator and show this divide buffer as symbol.
Any suggestion?
qgis symbology geometry-generator
add a comment |
Some background and working PostGIS query and Python script available here.
How to split circles in 12 sections in PostGIS?
I don't want to create a new polygon layer out of points. I really like QGIS Geometry generator. My idea is to use QGIS Geometry generator and show this divide buffer as symbol.
Any suggestion?
qgis symbology geometry-generator
Some background and working PostGIS query and Python script available here.
How to split circles in 12 sections in PostGIS?
I don't want to create a new polygon layer out of points. I really like QGIS Geometry generator. My idea is to use QGIS Geometry generator and show this divide buffer as symbol.
Any suggestion?
qgis symbology geometry-generator
qgis symbology geometry-generator
edited May 8 at 10:32
Vince
15k33050
15k33050
asked May 8 at 9:05
iRfAniRfAn
1,4161117
1,4161117
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
1) Prepare center points (used as seeds).
- Create your first center point as a point vector layer.
- Duplicate the point so that you have 12 points (in my Windows OS I will hit Ctrl+C to copy the point then hit Ctrl+V eleven (11) times.
- Then create a field to represent the center azimuth of each wedge (e.g.
"fid" * 30 - 15
in this example).
2) Start Geometry generator and give: wedge_buffer($geometry, "az", 30, 50)
Sorry#1: I had used Geometry by Expression
but you can use Geometry generator
.
Sorry#2: The figure shows center azimuth (15, 45, ...345) of each wedge buffer but you would be able to modify it easily.
Perfect, that was exactly what I was looking
– iRfAn
May 8 at 12:50
add a comment |
Great answer by @Kazuhito! An alternative could be to create a buffer on your point layer and then add another geometry generator layer to draw lines to represent the segments The value of 0.1
used in the expressions is the buffer distance, change this for your requirement.
Create the buffer using expression:
buffer($geometry, 0.1, 36)
Create the lines using expression:
make_line(
make_point( $X + 0.1*cos(radians(0)), $Y + 0.1*sin(radians(0))),
$geometry,
make_point( $X + 0.1*cos(radians(30)), $Y + 0.1*sin(radians(30))),
$geometry,
make_point( $X + 0.1*cos(radians(60)), $Y + 0.1*sin(radians(60))),
$geometry,
make_point( $X + 0.1*cos(radians(90)), $Y + 0.1*sin(radians(90))),
$geometry,
make_point( $X + 0.1*cos(radians(120)), $Y + 0.1*sin(radians(120))),
$geometry,
make_point( $X + 0.1*cos(radians(150)), $Y + 0.1*sin(radians(150))),
$geometry,
make_point( $X + 0.1*cos(radians(180)), $Y + 0.1*sin(radians(180))),
$geometry,
make_point( $X + 0.1*cos(radians(210)), $Y + 0.1*sin(radians(210))),
$geometry,
make_point( $X + 0.1*cos(radians(240)), $Y + 0.1*sin(radians(240))),
$geometry,
make_point( $X + 0.1*cos(radians(270)), $Y + 0.1*sin(radians(270))),
$geometry,
make_point( $X + 0.1*cos(radians(300)), $Y + 0.1*sin(radians(300))),
$geometry,
make_point( $X + 0.1*cos(radians(330)), $Y + 0.1*sin(radians(330)))
)
Result:
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%2f322085%2fhow-to-divide-a-buffer-using-geometry-generator-in-qgis-3-x%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
1) Prepare center points (used as seeds).
- Create your first center point as a point vector layer.
- Duplicate the point so that you have 12 points (in my Windows OS I will hit Ctrl+C to copy the point then hit Ctrl+V eleven (11) times.
- Then create a field to represent the center azimuth of each wedge (e.g.
"fid" * 30 - 15
in this example).
2) Start Geometry generator and give: wedge_buffer($geometry, "az", 30, 50)
Sorry#1: I had used Geometry by Expression
but you can use Geometry generator
.
Sorry#2: The figure shows center azimuth (15, 45, ...345) of each wedge buffer but you would be able to modify it easily.
Perfect, that was exactly what I was looking
– iRfAn
May 8 at 12:50
add a comment |
1) Prepare center points (used as seeds).
- Create your first center point as a point vector layer.
- Duplicate the point so that you have 12 points (in my Windows OS I will hit Ctrl+C to copy the point then hit Ctrl+V eleven (11) times.
- Then create a field to represent the center azimuth of each wedge (e.g.
"fid" * 30 - 15
in this example).
2) Start Geometry generator and give: wedge_buffer($geometry, "az", 30, 50)
Sorry#1: I had used Geometry by Expression
but you can use Geometry generator
.
Sorry#2: The figure shows center azimuth (15, 45, ...345) of each wedge buffer but you would be able to modify it easily.
Perfect, that was exactly what I was looking
– iRfAn
May 8 at 12:50
add a comment |
1) Prepare center points (used as seeds).
- Create your first center point as a point vector layer.
- Duplicate the point so that you have 12 points (in my Windows OS I will hit Ctrl+C to copy the point then hit Ctrl+V eleven (11) times.
- Then create a field to represent the center azimuth of each wedge (e.g.
"fid" * 30 - 15
in this example).
2) Start Geometry generator and give: wedge_buffer($geometry, "az", 30, 50)
Sorry#1: I had used Geometry by Expression
but you can use Geometry generator
.
Sorry#2: The figure shows center azimuth (15, 45, ...345) of each wedge buffer but you would be able to modify it easily.
1) Prepare center points (used as seeds).
- Create your first center point as a point vector layer.
- Duplicate the point so that you have 12 points (in my Windows OS I will hit Ctrl+C to copy the point then hit Ctrl+V eleven (11) times.
- Then create a field to represent the center azimuth of each wedge (e.g.
"fid" * 30 - 15
in this example).
2) Start Geometry generator and give: wedge_buffer($geometry, "az", 30, 50)
Sorry#1: I had used Geometry by Expression
but you can use Geometry generator
.
Sorry#2: The figure shows center azimuth (15, 45, ...345) of each wedge buffer but you would be able to modify it easily.
answered May 8 at 10:47
KazuhitoKazuhito
16.8k41987
16.8k41987
Perfect, that was exactly what I was looking
– iRfAn
May 8 at 12:50
add a comment |
Perfect, that was exactly what I was looking
– iRfAn
May 8 at 12:50
Perfect, that was exactly what I was looking
– iRfAn
May 8 at 12:50
Perfect, that was exactly what I was looking
– iRfAn
May 8 at 12:50
add a comment |
Great answer by @Kazuhito! An alternative could be to create a buffer on your point layer and then add another geometry generator layer to draw lines to represent the segments The value of 0.1
used in the expressions is the buffer distance, change this for your requirement.
Create the buffer using expression:
buffer($geometry, 0.1, 36)
Create the lines using expression:
make_line(
make_point( $X + 0.1*cos(radians(0)), $Y + 0.1*sin(radians(0))),
$geometry,
make_point( $X + 0.1*cos(radians(30)), $Y + 0.1*sin(radians(30))),
$geometry,
make_point( $X + 0.1*cos(radians(60)), $Y + 0.1*sin(radians(60))),
$geometry,
make_point( $X + 0.1*cos(radians(90)), $Y + 0.1*sin(radians(90))),
$geometry,
make_point( $X + 0.1*cos(radians(120)), $Y + 0.1*sin(radians(120))),
$geometry,
make_point( $X + 0.1*cos(radians(150)), $Y + 0.1*sin(radians(150))),
$geometry,
make_point( $X + 0.1*cos(radians(180)), $Y + 0.1*sin(radians(180))),
$geometry,
make_point( $X + 0.1*cos(radians(210)), $Y + 0.1*sin(radians(210))),
$geometry,
make_point( $X + 0.1*cos(radians(240)), $Y + 0.1*sin(radians(240))),
$geometry,
make_point( $X + 0.1*cos(radians(270)), $Y + 0.1*sin(radians(270))),
$geometry,
make_point( $X + 0.1*cos(radians(300)), $Y + 0.1*sin(radians(300))),
$geometry,
make_point( $X + 0.1*cos(radians(330)), $Y + 0.1*sin(radians(330)))
)
Result:
add a comment |
Great answer by @Kazuhito! An alternative could be to create a buffer on your point layer and then add another geometry generator layer to draw lines to represent the segments The value of 0.1
used in the expressions is the buffer distance, change this for your requirement.
Create the buffer using expression:
buffer($geometry, 0.1, 36)
Create the lines using expression:
make_line(
make_point( $X + 0.1*cos(radians(0)), $Y + 0.1*sin(radians(0))),
$geometry,
make_point( $X + 0.1*cos(radians(30)), $Y + 0.1*sin(radians(30))),
$geometry,
make_point( $X + 0.1*cos(radians(60)), $Y + 0.1*sin(radians(60))),
$geometry,
make_point( $X + 0.1*cos(radians(90)), $Y + 0.1*sin(radians(90))),
$geometry,
make_point( $X + 0.1*cos(radians(120)), $Y + 0.1*sin(radians(120))),
$geometry,
make_point( $X + 0.1*cos(radians(150)), $Y + 0.1*sin(radians(150))),
$geometry,
make_point( $X + 0.1*cos(radians(180)), $Y + 0.1*sin(radians(180))),
$geometry,
make_point( $X + 0.1*cos(radians(210)), $Y + 0.1*sin(radians(210))),
$geometry,
make_point( $X + 0.1*cos(radians(240)), $Y + 0.1*sin(radians(240))),
$geometry,
make_point( $X + 0.1*cos(radians(270)), $Y + 0.1*sin(radians(270))),
$geometry,
make_point( $X + 0.1*cos(radians(300)), $Y + 0.1*sin(radians(300))),
$geometry,
make_point( $X + 0.1*cos(radians(330)), $Y + 0.1*sin(radians(330)))
)
Result:
add a comment |
Great answer by @Kazuhito! An alternative could be to create a buffer on your point layer and then add another geometry generator layer to draw lines to represent the segments The value of 0.1
used in the expressions is the buffer distance, change this for your requirement.
Create the buffer using expression:
buffer($geometry, 0.1, 36)
Create the lines using expression:
make_line(
make_point( $X + 0.1*cos(radians(0)), $Y + 0.1*sin(radians(0))),
$geometry,
make_point( $X + 0.1*cos(radians(30)), $Y + 0.1*sin(radians(30))),
$geometry,
make_point( $X + 0.1*cos(radians(60)), $Y + 0.1*sin(radians(60))),
$geometry,
make_point( $X + 0.1*cos(radians(90)), $Y + 0.1*sin(radians(90))),
$geometry,
make_point( $X + 0.1*cos(radians(120)), $Y + 0.1*sin(radians(120))),
$geometry,
make_point( $X + 0.1*cos(radians(150)), $Y + 0.1*sin(radians(150))),
$geometry,
make_point( $X + 0.1*cos(radians(180)), $Y + 0.1*sin(radians(180))),
$geometry,
make_point( $X + 0.1*cos(radians(210)), $Y + 0.1*sin(radians(210))),
$geometry,
make_point( $X + 0.1*cos(radians(240)), $Y + 0.1*sin(radians(240))),
$geometry,
make_point( $X + 0.1*cos(radians(270)), $Y + 0.1*sin(radians(270))),
$geometry,
make_point( $X + 0.1*cos(radians(300)), $Y + 0.1*sin(radians(300))),
$geometry,
make_point( $X + 0.1*cos(radians(330)), $Y + 0.1*sin(radians(330)))
)
Result:
Great answer by @Kazuhito! An alternative could be to create a buffer on your point layer and then add another geometry generator layer to draw lines to represent the segments The value of 0.1
used in the expressions is the buffer distance, change this for your requirement.
Create the buffer using expression:
buffer($geometry, 0.1, 36)
Create the lines using expression:
make_line(
make_point( $X + 0.1*cos(radians(0)), $Y + 0.1*sin(radians(0))),
$geometry,
make_point( $X + 0.1*cos(radians(30)), $Y + 0.1*sin(radians(30))),
$geometry,
make_point( $X + 0.1*cos(radians(60)), $Y + 0.1*sin(radians(60))),
$geometry,
make_point( $X + 0.1*cos(radians(90)), $Y + 0.1*sin(radians(90))),
$geometry,
make_point( $X + 0.1*cos(radians(120)), $Y + 0.1*sin(radians(120))),
$geometry,
make_point( $X + 0.1*cos(radians(150)), $Y + 0.1*sin(radians(150))),
$geometry,
make_point( $X + 0.1*cos(radians(180)), $Y + 0.1*sin(radians(180))),
$geometry,
make_point( $X + 0.1*cos(radians(210)), $Y + 0.1*sin(radians(210))),
$geometry,
make_point( $X + 0.1*cos(radians(240)), $Y + 0.1*sin(radians(240))),
$geometry,
make_point( $X + 0.1*cos(radians(270)), $Y + 0.1*sin(radians(270))),
$geometry,
make_point( $X + 0.1*cos(radians(300)), $Y + 0.1*sin(radians(300))),
$geometry,
make_point( $X + 0.1*cos(radians(330)), $Y + 0.1*sin(radians(330)))
)
Result:
edited May 8 at 14:41
answered May 8 at 14:34
JosephJoseph
58.9k7102208
58.9k7102208
add a comment |
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%2f322085%2fhow-to-divide-a-buffer-using-geometry-generator-in-qgis-3-x%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