Geographic Information Systems Asked by joe_gerner on April 3, 2021
I have a polygon layer with a number as label. Now I want that my labeling is always in the left upper corner of the single polygon, like in the screenshot.The red rectangle is the position, where the label should be placed
If I zoom in the should be visible and placed like in the second screenshot.
If such a labeling is possible, how can I create that?
I tried the labeling tab of the gui, but it doesn´t work pretty well
With my settings the labels of other polygons where placed in their visible neighbours
To get that result in QGIS 3.14:
make_point(x_min( $geometry), y_max( $geometry))
in the expression boxAn alternative method for older QGIS versions:
make_point(x_min( $geometry), y_max( $geometry))
in the expression boxCorrect answer by Michel Stuyts on April 3, 2021
To completely answer the question we need to extend the answer of Michel by adding a label to any grid squares cut off by the top and left hand edges of the canvas. This can be done by updating the geometry expression to:
make_point(x_min(intersection(@map_extent, $geometry)), y_max( intersection(@map_extent, $geometry)))
Answered by Ian Turton on April 3, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP