본문 바로가기
English Guidance/QGIS Beginner

[QGIS Beginner] Toggle Editing Mode (for Vector Layer)

by CaptainJ 2024. 4. 16.
반응형

Hello,

In this post, we'll explore how to activate the Toggle Editing mode to make a vector layer editable.

 



Activating the Toggle Editing mode essentially means making the vector layer editable.

If Toggle Editing mode is not activated, you won't be able to use features like modifying fields in the attribute table or drawing new polygon files using the Add Polygon feature (Ctrl + .).

 


Let's first open a file with Toggle Editing mode disabled.

Download the Vietnam border map file from the following link and open the adm1 file in QGIS: https://data.humdata.org/dataset/cod-ab-vnm

You'll see the map of Vietnam's first-level administrative areas.


You can check the status of the Toggle Editing mode by finding the pencil icon (Toggle Editing) on the menu bar at the top of the main screen.

If all the icons in the row are inactive and cannot be clicked, the current layer is not editable.


You can also go to the layer window, right-click on the layer > Attribute table, and confirm that the Toggle Editing icon with a pencil is not active.


Now, let's activate this icon to make it clickable.

First, scroll down with the mouse wheel or click the minus zoom icon (Ctrl + Alt + -) until the Vietnam map fits entirely on one screen with enough space left over.


Then, click on the Select Features by Area or Single Click icon on the left.


Once a black cursor appears, drag a rectangle shape on the QGIS main screen to encompass the entire layer.


When you release the mouse after dragging, you'll see a vector layer highlighted in yellow, indicating that all attribute values are selected.


You can confirm this by going to the attribute table, where all values are selected as well.


Now, with all fields selected, save the layer with a different name.

Right-click on the layer > Export > Save Features As... or Save Selected Features As... 


In the next pop-up, follow the instructions below and press the "OK" button:

 

Format: ESRI Shapefile
File name: Click on the [...] button on the right > choose the desired location and name for saving.


A new shapefile has been added.


Now, let's check the Toggle Editing mode for this file.

You'll notice that unlike the previous file, the pencil icon for Toggle Editing is now active in the menu bar at the top.


Click on the Toggle Editing icon.

A few other icons on the sides will also be activated.

 

Now, let's test a simple edit by clicking on the 'Add Polygon Feature (Ctrl + .)' icon on the right.




Draw an arbitrary shape next to the Vietnam map.

When the dialog box prompting you to input attribute values appears, simply click 'OK' without entering anything.

 



A new shape's attributes will be added to the layer.

You can go to the attribute table to see how the row for this shape has been added without any values entered.


You can also refer to the previous post on attribute table editing (link: https://qgis-jaehee.tistory.com/11) for guidance on modifying these field values.

That concludes our post on how to activate Toggle Editing mode to make a vector layer editable.

Thank you!

반응형

'English Guidance > QGIS Beginner' 카테고리의 다른 글

[QGIS Beginner] Clipping (for Vector Layer)  (0) 2024.03.16

댓글