2

Trying to smooth and nice labeling for polygon features (lakes and seas, data from Naturalearthdata). But curved labeling does not work properly (I'm trying to achieve to label inside in the center of the polygon).
I know about the manual approach (drawing curved lines manually), but this is not the case (there are more than 1000 objects), so it takes too long. I have attached a screenshot of the current result. Maybe there is some plugin to do this or just set some specific properties to achieve this?

enter image description here

Additional image enter image description here

0

1 Answer 1

5

You can try to work with Geometrygenerator which you can use to place your labes. In this example the Polygon geometry of the lakes is converted into a line with the negative buffered lake polygon:

boundary(buffer($geometry,-0.2))

May be you should make the buffer value related to the size (area) of the lake, for example with a rule based labeler.

enter image description here

7
  • When I tried this expression "boundary(buffer($geometry,-0.2))" I got my QGIS 3.28.8 crushed.
    – GeoEth
    Jul 29, 2023 at 17:12
  • And as I see, there are not all objects labeled from this expression, Nipigon Lake for example (north of Superior Lake).
    – GeoEth
    Jul 30, 2023 at 10:19
  • Yes, as I wrote, you should make a rule-based labeler to handle different sizes of lakes, smaller lakes should be buffered with smaller values. The example posted above uses lat-lon values which is not the best choice, that was quick drawn to explain how to do it.
    – eurojam
    Jul 30, 2023 at 10:32
  • What kind of expression it could be? Something like this?: CASE WHEN "scalerank" = '1' THEN boundary(buffer($geometry,-0.6)) WHEN "scalerank" = '2' THEN boundary(buffer($geometry,-0.5)) WHEN "scalerank" = '3' THEN boundary(buffer($geometry,-0.4)) WHEN "scalerank" = '4' THEN boundary(buffer($geometry,-0.3)) WHEN "scalerank" = '5' THEN boundary(buffer($geometry,-0.2)) END
    – GeoEth
    Jul 30, 2023 at 11:06
  • if possible I would switch from lat-lon to metrics, but in general that looks good
    – eurojam
    Jul 30, 2023 at 13:40

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.