Digitizing Lines
This tutorial walks through the process of digitizing lines using the tools available within the Digitizing Toolbar in QGIS to create line features.
Included in this tutorial:
Setting up for Digitizing: accessing the Digitizing Toolbar and Toggling Editing mode
Adding Line Features
Editing Line Features with the Vertex tool
Highlighting other digitizing tools
Software version in examples: QGIS 3.40.5-Bratislava
Credits: D. Wexler & L. Meisterlin (2025)
The overall process of digitizing is simple:
Toggle on “editing mode” to make your layer editable.
Add and edit features within your editable layer.
Save changes to your editable layer.
Toggle off “editing mode.”
Related Tutorials: Creating New Vector Datasets, Digitizing Points, Digitizing Polygons
Setting Up for Digitizing
Accessing the Digitizing Toolbar
To set up QGIS for digitizing, access the Digitizing Toolbar by clicking through View (from the main menu) > Toolbars > Digitizing Toolbar. A check mark will appear next to it once it has been selected and added to your interface.
activating the Digitizing Toolbar
Preparing your Layer for Digitizing (Toggle Editing Mode)
You can digitize features in a new or existing polyline dataset. If necessary, create a new (empty) vector dataset to contain the features you will digitize.
Add the new or existing polyline layer to your map project and select (highlight) it in the Layers panel. With the layer’s name highlighted, click Toggle Editing in the Digitizing Toolbar. Alternatively, you can access this option by right-clicking on the layer’s name in the Layers panel and choosing Toggle Editing. This turns “editing mode” on and allows you to make changes to the selected dataset or layer.
the Toggle Editing button in the Digitizing Toolbar
accessing the Toggle Editing option by right-clicking on the layer’s name
You will see additional options become available in the Digitizing toolbar. You will also see a pencil icon appear over your selected layer’s name, indicating to you that the layer is currently editable.
Adding Lines Features
With your layer now editable, you are able to access the Add Line Feature tool in the Digitizing Toolbar. When you select it, you will notice your cursor changes to a crosshair.
accessing the Add Line Feature tool in the Digitizing Toolbar
To create (digitize) a new line feature, with the Add Line Feature tool activated, (left-)click on your map view wherever you want to start the line. You can continue to click at each vertex location to create the polyline feature. You will notice that as you click, you are creating multiple segments which make up one line feature. Each time you click and add an additional segment to your line feature, a vertex is generated.
TIPS & TOOLS: Before you start, you can also select different approaches for digitizing your lines from the Digitizing toolbar. A dropdown menu of these options is available to the left of the Add Line Feature button.
The default option is the Digitize With Segment tool, which allows you to digitize segment-by-segment by clicking on vertex locations, as described above. Alternatively, you can choose to Digitize With Curve, Stream Digitize, and Digitize Shape.
In our example below, we are digitizing a feature on an empty map. More likely, you may be digitizing over a georeferenced base map image.
Once you are satisfied with the line feature you’ve drawn, right-click on your map view to indicate you have finished drawing the line feature. A dialogue box will appear and prompt you to enter feature attributes, which correspond with the fields in your layer’s attribute table. Once you have entered in your information, you can click OK to commit the feature to your layer.
adding and committing line features to the active layer
When you are finished adding lines, you can click the Save Layer Edits button in the Digitizing toolbar and Toggle Editing mode off (to prevent unwanted accidental changes to your dataset). If you have your editable layer’s attribute table docked, the Toggle Editing Mode, and Save Layer Edits buttons will also appear there.
Editing Line Features
Using the Vertex Tool on Line Features
The Vertex Tool allows you to manipulate vertices and geometry in your data. Click on the tool in the Digitizing Toolbar to activate it. (The Vertex Tool is to the right of the Add Line Features tool on the Digitizing toolbar.) You will see a dropdown option next to the tool’s icon, with two options:
Vertex Tool (All Layers) allows you to adjust, reposition and delete vertices from any layer with Toggle Editing activated
Vertex Tool (Current Layer) will only let you make these adjustments to your selected/active layer
The Vertex Tool allows you to manipulate the line features you’ve created in a number of ways. When you hover over your line feature with the Vertex Tool activated, you will see that you can see the individual segments and vertices which make up your line feature. You have a few options with how you can use this tool:
Repositioning individual vertices: You are able to adjust the location of individual vertices by clicking on them and moving them
Selecting, deleting, copying, and pasting vertices: You are able to select individual vertices by clicking and dragging over vertices of interest. You will see a blue box that extends with your cursor until you let go of the mouse. All vertices that intersect with this box will be selected and will be highlighted in blue . If you have your attribute table open, you will see they are highlighted after this action. You can then use the other editing tools from the digitizing toolbar (see “Other Digitizing Toolbar Options” below)
Creating new vertices: When you hover over a line feature, you will notice a plus (+) sign which appears at the midpoint and endpoints of a given segment. If you wish to create a new vertex, you can click on the plus sign and drag/drop to adjust the shape of your line feature. If you are adding vertices from the endpoint, you can right click to complete your adjustments like you do when creating a brand new line feature
Other Digitizing Toolbar Options
There are a few additional basic tools available to you in the Digitizing Toolbar:
Modify The Attributes of All Selected Features Simultaneously: This allows you to modify information in the attribute table for multiple line features.
Delete Selected: Will delete the selected feature
Cut Features: Will cut the selected feature and save it to your clipboard. It can then be pasted to other feature classes/layers as long as they have a compatible geometry type
Copy Features: Will copy the selected feature and save it to your clipboard. It can then be pasted to other feature classes/layers as long as they have a compatible geometry type
Paste Features: Allows you to paste features saved to your clipboard.
Undo: Allows you to undo the most recent action(s) you’ve taken. Note, once you have saved edits to your feature class you cannot undo your work
Redo: Allows you to redo the most recent action(s) you’ve taken. Note, once you have saved edits to your feature class you cannot undo your work