Populate field by numbering different types of roads using field calculator [duplicat

المشرف العام

Administrator
طاقم الإدارة
This question already has an answer here:



I am trying to populate the Func_class field by numbering each type of road in my attribute table.

I have different road types such as 'secondary road','local road','main road' see picture etc



I want to number them such as:


  • Off road Sealed Path =1
  • off Road Track =1
  • Local Road =2
  • Secondary Lane (Bike Path=3
  • Main Road (Bike Path=3
  • Secondary Road=4
  • Main Road =4
I want to use If statement but I am not sure how to do that in Python



أكثر...
 
أعلى