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;
}







4















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?










share|improve this question































    4















    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?










    share|improve this question



























      4












      4








      4


      2






      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?










      share|improve this question
















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited May 8 at 10:32









      Vince

      15k33050




      15k33050










      asked May 8 at 9:05









      iRfAniRfAn

      1,4161117




      1,4161117






















          2 Answers
          2






          active

          oldest

          votes


















          4














          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).


          enter image description here



          2) Start Geometry generator and give: wedge_buffer($geometry, "az", 30, 50)



          enter image description here



          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.






          share|improve this answer
























          • Perfect, that was exactly what I was looking

            – iRfAn
            May 8 at 12:50



















          4














          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.





          1. Create the buffer using expression:



            buffer($geometry, 0.1, 36)  


            Create buffer




          2. 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)))
            )


            Make lines for segments




          3. Result:



            enter image description here








          share|improve this answer


























            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%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









            4














            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).


            enter image description here



            2) Start Geometry generator and give: wedge_buffer($geometry, "az", 30, 50)



            enter image description here



            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.






            share|improve this answer
























            • Perfect, that was exactly what I was looking

              – iRfAn
              May 8 at 12:50
















            4














            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).


            enter image description here



            2) Start Geometry generator and give: wedge_buffer($geometry, "az", 30, 50)



            enter image description here



            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.






            share|improve this answer
























            • Perfect, that was exactly what I was looking

              – iRfAn
              May 8 at 12:50














            4












            4








            4







            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).


            enter image description here



            2) Start Geometry generator and give: wedge_buffer($geometry, "az", 30, 50)



            enter image description here



            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.






            share|improve this answer













            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).


            enter image description here



            2) Start Geometry generator and give: wedge_buffer($geometry, "az", 30, 50)



            enter image description here



            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.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            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



















            • 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













            4














            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.





            1. Create the buffer using expression:



              buffer($geometry, 0.1, 36)  


              Create buffer




            2. 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)))
              )


              Make lines for segments




            3. Result:



              enter image description here








            share|improve this answer






























              4














              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.





              1. Create the buffer using expression:



                buffer($geometry, 0.1, 36)  


                Create buffer




              2. 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)))
                )


                Make lines for segments




              3. Result:



                enter image description here








              share|improve this answer




























                4












                4








                4







                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.





                1. Create the buffer using expression:



                  buffer($geometry, 0.1, 36)  


                  Create buffer




                2. 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)))
                  )


                  Make lines for segments




                3. Result:



                  enter image description here








                share|improve this answer















                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.





                1. Create the buffer using expression:



                  buffer($geometry, 0.1, 36)  


                  Create buffer




                2. 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)))
                  )


                  Make lines for segments




                3. Result:



                  enter image description here









                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited May 8 at 14:41

























                answered May 8 at 14:34









                JosephJoseph

                58.9k7102208




                58.9k7102208






























                    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%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





















































                    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

                    He _____ here since 1970 . Answer needed [closed]What does “since he was so high” mean?Meaning of “catch birds for”?How do I ensure “since” takes the meaning I want?“Who cares here” meaningWhat does “right round toward” mean?the time tense (had now been detected)What does the phrase “ring around the roses” mean here?Correct usage of “visited upon”Meaning of “foiled rail sabotage bid”It was the third time I had gone to Rome or It is the third time I had been to Rome

                    Bunad

                    Færeyskur hestur Heimild | Tengill | Tilvísanir | LeiðsagnarvalRossið - síða um færeyska hrossið á færeyskuGott ár hjá færeyska hestinum