A method for creating curved labels in QGIS

Описание к видео A method for creating curved labels in QGIS

Want to create curved labels on a globe in QGIS? Or even not on a globe? Well here is a method that should work for you. Here's the previous video that shows you how to create a globe view:    • Видео  

And here's the expression I used in the video to create a curved label. It's a geometry generator expression but instead of using it to create a shape, we're using it define the position of a label.

densify_by_count(
make_line(
make_point(86,-22),
make_point(150,-22))
,100)

This expression will create a label along a line from 86 degrees east, 22 degrees south to 150 degrees east, 22 degrees south. So you can just modify the lat/long numbers to position the label as you wish. If instead I wanted a diagonal label that still followed the curvature of the earth, and positioned in the bounding box over Indonesia, I could use slightly modified lat/long numbers, like this.

densify_by_count(
make_line(
make_point(82,-19),
make_point(155,2))
,100)

Have a try and see how it goes.

See my intro and intermediate QGIS courses for more: https://www.udemy.com/user/alasdair-r...

Комментарии

Информация по комментариям в разработке