5

Using QGIS 2.14 and 2.18

Is it possible to place the "label" for the cadastral polygons based on the property shape? Meaning, based on the objects geometry.

The default placement is either horizontal or vertical (mostly I'm not sure how else to do this) eg. the default placement

Ideally, I would like to place the labels as shown below

Expected behavior

Is this possible given so much of improvement in the QGIS labeling engine in the recent releases.

If possible, can someone please provide the details?

11

What you're looking for is 'free' labeling. Find it under the label placement options:

free labeling

An example of one of my maps using Free label placement: enter image description here

It's not always perfect, and it can be slow at times but it's usually good enough. The key to success in my experience is making sure that at your map's scale your font-size is generally small enough to fit the entire label in the feature.

To speed up my workflow I typically use rule-based labeling so the free placement is only used in my print composers and not the canvas. You can duplicate your labeling and set filters to accomplish this: enter image description here

  • Thanks Jesse McMillan. This is what I was expecting, but have to experiment myself. The idea of printing only on the map composer is very sleek. – Garry Feb 6 '17 at 2:38
1

If you want it strictly horizontal or vertical you could create rules based on the following expression:

bounds_height($geometry)/bounds_width($geometry)

If the value is greater than 1 it is a 'portrait' shape, so label vertically, if it less than one it is 'landscape' so label horizontally.

That said, I prefer the look of free labelling.

  • Yes, the free label option is better. I don't want the strict horizontal or vertical option, they are not good for cadastral data. – Garry Feb 6 '17 at 2:39

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.