[GIS] Updating column in Field Calculator using values of another column

arcgis-10.2arcgis-desktopfield-calculator

I am very new to GIS, so I hope to get some help. I am using ArcGIS 10.2 for Desktop.

I want to create a new numeric column on my attribute table to store "seasons" in numbers.

For example, I want the "seasons" field to hold a numeric code (i.e. "summer" will be "1", "autumn" to be "2", "winter" to be "3" and "spring" to be "4").

How can I do this using the field calculator?

Best Answer

I am guessing you are using ArcGIS from your terminology.

1) Add a new field called 'codes'. Type = Short Integer

2) Select by attributes --on the top menu-- "seasons = Summer".

3) Open the attribute table and in the field calculator click on the field you added in step 1 and type 1.

It will only do the selected records so all summers will get 1.

Repeat for Spring and so on.

You can use "if" in the field calculator but as your a newbie and you only have four classes just do selections for now.

Do not even bother turning on edit mode unless you need to "undo."