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?

2 Answers 2


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.

  • Perfect, that was exactly what I was looking
    – iRfAn
    May 8, 2019 at 12:50

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_point( $X + 0.1*cos(radians(0)), $Y + 0.1*sin(radians(0))),
    make_point( $X + 0.1*cos(radians(30)), $Y + 0.1*sin(radians(30))),
    make_point( $X + 0.1*cos(radians(60)), $Y + 0.1*sin(radians(60))),
    make_point( $X + 0.1*cos(radians(90)), $Y + 0.1*sin(radians(90))),
    make_point( $X + 0.1*cos(radians(120)), $Y + 0.1*sin(radians(120))),
    make_point( $X + 0.1*cos(radians(150)), $Y + 0.1*sin(radians(150))),
    make_point( $X + 0.1*cos(radians(180)), $Y + 0.1*sin(radians(180))),
    make_point( $X + 0.1*cos(radians(210)), $Y + 0.1*sin(radians(210))),
    make_point( $X + 0.1*cos(radians(240)), $Y + 0.1*sin(radians(240))),
    make_point( $X + 0.1*cos(radians(270)), $Y + 0.1*sin(radians(270))),
    make_point( $X + 0.1*cos(radians(300)), $Y + 0.1*sin(radians(300))),
    make_point( $X + 0.1*cos(radians(330)), $Y + 0.1*sin(radians(330)))

    Make lines for segments

  3. Result:

    enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.