当前位置:网站首页>arcpy. SpatialJoin_ Analysis spatial connection analysis

arcpy. SpatialJoin_ Analysis spatial connection analysis

2022-07-05 07:14:00 RS&Hydrology

Reference material :https://pro.arcgis.com/zh-cn/pro-app/latest/tool-reference/analysis/spatial-join.htm

1. effect
spatial analysis : Connect the attributes of one feature class to the attributes of another feature class according to the spatial relationship . The target feature and the connected attributes from the connected feature are written to the output feature class .

2. Usage method

SpatialJoin_analysis (target_features, join_features, out_feature_class, {
    join_operation}, {
    join_type}, {
    field_mapping}, {
    match_option}, {
    search_radius}, {
    distance_field_name})

3. give an example

import arcpy

target_features = "C:/data/usa.gdb/states"
join_features = "C:/data/usa.gdb/cities"
out_feature_class = "C:/data/usa.gdb/states_cities"

arcpy.SpatialJoin_analysis(target_features, join_features, out_feature_class)

similar Arcmap Select by attribute in , Then assign a certain attribute value to the target layer .

原网站

版权声明
本文为[RS&Hydrology]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202140559171939.html