3

I'm trying to create a global map grouping countries by some criteria, in QGIS, I download one template with all countries, and I'm trying to update this dataset. I opened attributes table --> edit -->add column, and after I choose the calculator opcion and I use if "id country" = "US" then 1, "id country" = "GB" then 2.... etc and after I save this table, but when I try to close and open the same table I see that the changes are not saved, and I can't use after this.

Do you know how can I save this changes permanently to use this new column in categorizing by colors?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Carlos Tellez
  • 147
  • 1
  • 2
  • 10

2 Answers2

0

For add an new field in the attribute table you need .

  1. select the layer
  2. open/show the attribute table
  3. active the editing for the table (pencil button left above on attibute table)
  4. Open the field calculator
  5. Add the field you need and press ok when done
  6. deactivate the editing for the table and save the changed layer

anyway you could remap the value for change color directly in layer properties changing the style as catogorized (in the layer style top combo) and adding a proper value mapping for each value in specificied section

ScaisEdge
  • 131,976
  • 10
  • 91
  • 107
0

I would recommend you to check this:

https://docs.qgis.org/2.18/en/docs/user_manual/working_with_vector/attribute_table.html

and jump to the section: Introducing the attribute table interface where you have all relevant icons explained.

Geographos
  • 827
  • 2
  • 23
  • 57