QGIS Ellipse Marker Line Pattern – Creating Ellipse Marker with Line Pattern Fill in QGIS

fillmarkersqgisstylesymbology

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

Best Answer

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

Related Question