计算值工具是一种多功能 模型构建器 工具,可从 ArcGIS Arcade 或 Python 表达式返回值。
表达式
使用表达式参数执行各种计算。
数学分析
计算值工具支持 Arcade Max 函数,可获取一组数字中的最大值。
返回数字数组中的最大值。
var values = [-193, 0, 42, 40, 90];
return Max(values);

If-then-else
表达式参数同样可以接收来自输入变量的值。 在以下示例中,if 关键字定义了条件为 true 时执行的语句块。 else 关键字定义了条件为 false 时执行的语句块。 条件必须评估为 true 或 false,否则表达式将失败。
以下示例评估了定义的输入变量是否大于 50,如果为 true 时则返回一条注释;否则,返回另一注释。
