6

How can I create an ellipse marker with line pattern fill in QGIS?

Like this:
enter image description here

I have already made simpler symbols, but there is no solution with the ellipse

enter image description here

3 Answers 3

5

To get the different symbols for each half of the ellipse:

  • make a Geometry Generator symbol layer
  • use this expression
with_variable('ellipse',
    make_ellipse( $geometry, 10, 5, 0),    -- make an ellipse and assign it to a variable
        rotate(
            intersection(                  -- get intersection of rectangle and ellipse to 'clip' half of it
                 make_rectangle_3points(   -- make a rectangle that is half the bounding box of the ellipse
                        project($geometry,  y_max(@ellipse) - y($geometry), 0),  -- project a point from the original point directly north by half the height of the ellipse
                        project($geometry,  y_max(@ellipse) - y($geometry), radians(180)),  -- project a point from the original point directly south by half the height of the ellipse
                        make_point(x_max(@ellipse), y_min(@ellipse))  -- make a point of the 'lower right' corner of the bounds of the ellipse
                 ),
                 @ellipse      -- @ellipse is the variable name of the ellipse made above
            ),      
        120, $geometry     -- rotate the half-ellipse, 120 is the rotation angle, $geometry is the center of rotation (the original point geometry)
        )
)
  • duplicate the symbol layer
  • change angle in rotate by 180 degrees so the new symbol layer aligns with the first (in my case 120->300)
  • style the 2 symbol layers as desired
  • don't forget to set Units to Millimeter for a scalable symbol

enter image description here

5

Use Geometry Generator with the following expression:

make_ellipse(centroid($geometry), 1, 2, 0)

Change values 1 (semi_major_axis) and 2 (semi_minor_axis).

enter image description here

0
3

You can use a Filled Marker.

  • Choose the semi-circle shape
  • set your desired rotation and give it a line fill.
  • Then add another symbol layer with the semi-circle Filled Marker (or duplicate first symbol layer)
  • give it the opposite rotation so they align, make this a simple fill (with No Brush).

enter image description here

1
  • 1
    Thanks for the advice ! But I need an ellipse not a circle.
    – Ivan M
    Commented Feb 9, 2022 at 14:35

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.