I would like to turn my line into polygon in the symbology.

I found some hint here: https://anitagraser.com/2017/04/08/a-guide-to-geometry-generator-symbol-layers/ but I am not sure of the expression, which should be included.

I tried something like this, but the fill is not visible at all. I've got a line only.

enter image description here

How can I make fill for these enclosed lines?

  • 1
    Please provide the expression you use to create the polygon. If you don't have one, then there's your error.
    – Erik
    Aug 25, 2020 at 13:54

1 Answer 1


Let's assume there is a polyline layer "line", see image below.


Proceed with RMT > Symbology > Single Symbol > Line > Geometry Generator

Use the following code make_polygon($geometry) in the "Geometry Generator"-field and change the Geometry Type into 'Polygon/MultiPolygon'.


Additionally try convex_hull($geometry) that will produce a Convex hull.


Note: Mind the forms/shape/guise of your lines.

P.S.: I can suggest inspecting the geometry menu in the 'Expression Dialog', see image below


  • Perfect! It was exactly what I was looking for!
    – Geographos
    Aug 25, 2020 at 14:24
  • Which one did you use convex_hull() or make_polygon()?
    – Taras
    Aug 25, 2020 at 15:00
  • I used convex_hull()
    – Geographos
    Aug 25, 2020 at 16:04
  • make_polygon is also fine, I've checked it
    – Geographos
    Aug 25, 2020 at 16:25

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.