Drawing Lines and Adding Attributes in QGIS

  • 4 months ago
Open QGIS.
Go to Layer > Create Layer > New Geopackage Layer (or New Shapefile Layer).
Choose a location to save the file and give it a name.
Under Geometry Type, select “LineString” to create a line layer.
(Optional) Add additional fields (attributes) if necessary.
Click “OK” to create the new layer. It should now appear in your Layers Panel.
Select the newly created layer in the Layers Panel.
Click the yellow pencil icon on the toolbar to enable editing (toggle editing) for the selected layer.
Now, you should see an “Add Line Feature” icon (a pencil drawing a line) in the toolbar. Click on it.
Your cursor will change into a crosshair. Click the left mouse button on the map canvas to start drawing the line at the desired starting point.
Continue clicking the left mouse button to add vertices (points) along the line.
To finish drawing the line, right-click once. A dialog box may appear asking you to fill out attribute information if you added fields earlier. Fill out the information and click “OK.”
Click the “Save Layer Edits” disk icon in the toolbar to save your changes to the layer.
To exit editing mode, click the yellow pencil icon again to toggle editing off.