操作方法
为新要素图层创建要素时,很少会引用要素图层的现有表或属性表来填充表和要素图层的匹配字段的值。 创建大量要素时,使用现有表重新填充字段可能非常耗时,或者需要执行其他步骤来运行计算。 可以在使用属性规则创建要素时自动填充数据。
var sourceTable = FeatureSetByName($datastore,"<Feature_Name>", ["<Matching_Field>", "<Output_Field>"], false) var matchingAttr = $feature.<Matching_Field> var matchedFeature = First(Filter(sourceTable, "<Matching_Field> = @matchingAttr")) If (matchedFeature == null){ return "not found"} else{ return matchedFeature.<Output_Field>}
var sourceTable = FeatureSetByName($datastore,"House", ["OBJECTID", "Direction"], false) var matchingOID = $feature.OBJECTID var matchedFeature = First(Filter(sourceTable, "OBJECTID = @matchingOID")) If (matchedFeature == null){ return "not found"} else{ return matchedFeature.matchedFeature.Direction}
文章 ID: 000030999
获取来自 ArcGIS 专家的帮助
下载 Esri 支持应用程序