-1

I would like to create labels with different shapes in the same layer (like ellipse and triangle).

Is it possible?

I just read Creating different label styles for different polygon classes using QGIS?, but it's for the style.

  • 1
    Welcome to gis.SE! Please take the tour and learn how to write good questions. Give more info and share what you have tried so far. – Stefan Jan 13 at 22:42
2

You can have shapes in your label. It is up to you to display both shapes and text, or just shapes (or most commonly, just text).

Before going the label way, it is worth considering using a style. You could even have multiple style per layer, one rendering the data as polygon and another one rendering it as a point - with the shape of your choice.

To have different shapes in the layer labels, you would need different labeling rules, similar to the style rules.

Open your layer label panel, select Rule-based labeling and create as many rule as required (one per shape, with the appropriate filter like my_var = 1

enter image description here

If you just want to show the shape, then you would write the text transparently.

enter image description here

For the shapes, you would use the background options. For the ellipse, it is pre-defined so you can just select the shape name.

enter image description here

For the triangle or for more complex shapes, you would use an SVG file. Select the SVG option, then browse to the app symbols, backgrounds and select the triangle.

In both case, you should put a fixed size if the shape is not related to the text length. Similarly, you can change the color.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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