Categories: GIS Learning

How to Add Leader Lines to Labels in QGIS 3.10

The release of QGIS version 3.10 brought with it the native capability to add leader lines to labels. Prior to this release, adding leader lines involved have to add Geometry Generators and some lines of code (step-by-step instructions on how to do this for those running QGIS 3.4 and earlier are provided by Randy Hale).

Ad

Adding leader lines (or call-outs) to your labels, is handy when you are trying to label a small area, or you have too many labels to fit into the area you need to label. Adding leader lines adds readability to your map when dealing with crowded labels.

Here are step-by-step instructions on how to add leader lines to labels using QGIS 3.10.

Turn on Labels in QGIS

First, you want to turn on labels and force the label renderer to add all labels, even if they are overlapping. Right-click on the layer and select the properties option from the menu. Then click on Labels and set up the field you want to label on. Under rendering, make sure the “Show all labels” box is checked.

As you can see from the map below, the labeling is unreadable in areas where there are too many labels.

Enable the Label Callout Function in QGIS

The next step is to enable the label callouts function. Head back to properties –> labels and select “callouts”. Then make sure the “Draw callouts” option is clicked. You can choose from two line shapes – a simple linear line or Manhattan lines (which transforms angles to a 45 degree line). You can also set the line style and decide where you want the line to originate from your feature.

Now you are ready to move your labels so they are more readable. Before you start this step, make sure you have a field in your layer that contains unique values for each of your features. Note the field name as you will need this.

Turn on the Label Toolbar in QGIS

If you don’t already have it enabled, go to View –> Toolbars and make sure the “Label Toolbar” is turned on so you can access the label tools.

Set up the Move Labels Function in QGIS

From the toolbar, turn on the tool that moves labels (the icon with abc and a right pointing arrow).


Ad:


With the layer highlighted in the layers table of contents that you want to create leader lines for, click on any label on that layer. This will bring up an interface where you will select the field that contains a unique ID for each feature in your layer. It’s important to select the correct field or else moving labels will not function properly.

Moving Labels in QGIS

Once you’ve set the unique field, you are ready to start moving labels. Click on a label you want to move. You will see the boundary of the label change to green. As you move your cursor, a green outline of the label space will move with the cursor. When you’ve located a spot on the map where you want the label to be, click again and the label will drop, along with a leader line back to the feature.

Ad

Move any labels manually outside of the polygon feature to automatically create leader lines. You can also move labels within a polygon to readjust them. The leader lines only show up once the label is fully outside of the polygon feature.

Video Tutorial: How to Add Leader Lines to Labels in QGIS

Related

Ad
Ad:
Share
Published by

Recent Posts

Geolocation Data, Geofencing Warrants, and Crime

With most adults carrying mobile devices that have GPS tracking capabilities, mapping our movements has…

March 26, 2020

Open Access Novel Coronavirus Data

A newly published article in Nature's Sci Data decribes how epidemiologists collected and curated individual-level…

March 24, 2020

This Map is Tracking the Novel Coronavirus (COVID-19) in Near-Realtime

As new cases of the Novel Coronavirus (COVID-19) are reported, an interactive map developed by…

March 23, 2020

How to Volunteer Your GIS and Cartography Skills

Those with GIS and cartography skills that want to volunteer to help out can do…

March 20, 2020

Esri Offering Free ArcGIS Online Six-Month Subscription to Organizations to Assist with COVID-19 Response

Esri is making some of its online GIS tools available for free to private and…

March 19, 2020

How Geospatial Conferences are Responding to the Coronavirus Outbreak

Here's a growing list of how geospatial conferences are reacting to the novel coronavirus outbreak.

March 13, 2020