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.

1 Answer 1


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.

  • 2
    Thanks for your response. Having re-read my original post I don't think I expressed my problem properly. What I want to do is to select certain land uses from Field 1 and if that Field does not have the relevant value then I need to check Field 2 for a certain land use value (sorry if this is a little vague!). Anyway, I think I have the solution by using something like this: CASE WHEN "LandUse1" like 'D%' then 'D' WHEN "LandUse1" like 'A%' then 'A' WHEN "LandUse1" IS NULL then substr("LandUse2",1,1) ELSE 'FAIL' END Sep 8, 2013 at 9:30
  • easiest way is import data to postgis, and just use sql , akter table xx add xxx text , update xxx set ... Dec 16, 2013 at 8:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.