Although I am using QGIS 2.6.1 Brighton Version, the basic step should be same for all the QGIS version.
I am preparing GIS data for the Sahana Alerting and Messaging Broker (SAMBRO) for the Nepal training which I will be doing during December 2017. I got these data from my friend at Survey Department of Nepal. But the problem is that I need these data in a specific format. So I will try to update some of the column names and update the column value as well.
Updating Column Name in QGIS
- First load the layer in QGIS. Shapefiles can be opened by drag and drop.
- You will need Table Manager to perform renaming (although other methods are also available, this is easier for me for the time being). To download the plugin, go to
Plugins
menu, and clickManage and Install Plugins...
. Type Table Manager in the search box. Click on the searched item called Table Manager and install the Plugin. - Then, select by clicking the layer which you want to edit the
Layers
widget. Then click on the Table Manager icon to open up.Go to
Fields
tab, select the column name and click onRename
button on the side. - Click
OK
andSave
to save and update the column name.
Confirm by opening up theAttribute Table
Creating New Column and updating the Value of the Column
- First load the layer in QGIS. Shapefiles can be opened by drag and drop.
- Right click on the layer and click
Open Attribute Table
- Click on the pencil icon at the top left side, which is to toggle the
Editing Mode
on/off for the layer. We want to set the edit mode on. - Once the edit mode is on, click on the
New Column
icon or pressCtrl+W
Then, type the columnName
and specify itsType
in theAdd column
dialog that opens up.Click OK.
- If you want to update a specific column value, double-click on the Value and change it to the required value.
- Or if you want to update the value to all the rows of the newly created column, then select the appropriate Column Name and set the value and click
Update All
.Select the appropriate Column.Then, select the appropriate Expression. Since I want to update the new column with value NP, so I am using
upper('NP')
as the expression. You can learn more about theExpressions
andFunction Lists
hereThen hit
Update All
to update all the values of the column.
Leave a Reply