如何引用属性字段并将结果输出到不同的属性字段?
How do you reference a attribute field and output results onto a different attribute field?
这是我正在尝试做的....
状态STATU_DESC
1 被占领
2 未占用
3 忙
4 没有信息
我认为这样的事情应该可行:
def calc_status_desc(status):
if status == 1:
return 'Occupied'
elif status == 2:
return 'Not Occupied'
elif status == 3:
return 'Busy'
elif status == 4:
return 'No information'
else:
return None
在字段计算器中 select python 并像这样调用它,
calc_status_desc(!STATUS_DESC!)
这是我正在尝试做的....
状态STATU_DESC 1 被占领 2 未占用 3 忙 4 没有信息
我认为这样的事情应该可行:
def calc_status_desc(status):
if status == 1:
return 'Occupied'
elif status == 2:
return 'Not Occupied'
elif status == 3:
return 'Busy'
elif status == 4:
return 'No information'
else:
return None
在字段计算器中 select python 并像这样调用它,
calc_status_desc(!STATUS_DESC!)