[GIS] Select features from attribute table and then create a new field with the selected attribute data

qgis

I have a shape file which contains land use typology for my administrative area. I’m investigating deficiency in certain land uses and there are 2 ‘standards’ that we have to use. These standards use different land uses. The Shapefile has a field in the attribute table that contains all the land uses, for example each polygon can have a land use of either A1 – 12, B1 – 12, C1-12 etc. One standard requires land uses A1 – 6 and C5 -9 and the other A1-12 and B1-9. The Land uses A, B & C have separate fields. I have created an SQL query in the advanced search that selects these land uses. What I now want to do is create 2 new fields, one which populates the selected land use for each standard. I know I can select the attributes and save as a new selection but ideally I would like to populate 2 new fields with the attributes from the existing land use field.

Best Answer

Use the field calculator. Essentially you are asking the field calculator to read the values from one column and input them in the new fields. Set "use selected features" and "update existing" if you have already created the target column. In the tree of options to the lower left, you expand the bottom branch and double click on the name of the field as the source. With luck, this will automagically put that field name into the dialog box, surrounded by double quotes.

I think what you are asking to be done, is the most elementary thing the field calculator does so it may be a bit daunting with all the possibilities.

Also there is a plugin called something like "Quick Multi Attribute Edit/Update" which might be of use in similar circumstances.

Related Question