如何引用属性字段并将结果输出到其他属性字段上?

问题描述 投票:-1回答:1

enter image description here

这是我想做的。...

状态STATU_DESC1名2未占领3忙4没有信息

python-3.x arcgis-js-api
1个回答
1
投票

我认为这样的事情应该起作用:

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

[在字段计算器中,选择python并像这样调用它,calc_status_desc(!STATUS_DESC!)

calculate field example


0
投票

enter image description here这是对我有用的正确代码。谢谢您的帮助。

© www.soinside.com 2019 - 2024. All rights reserved.