(地理国情监测)arcpy使用SelectLayerByLocation进行空间位置选择、SelectLayerByAttribute进行属性选择,使用CopyFeatures_management进行选择要素导出。
coding = 'utf-8'
import os #加载os库
import arcpy #加载arcpy库
file_dir_Source ="E:\\001.yangdebin\\001.集水区\\国情监测水网数据\\test.gdb\\CHydDataset\\UV_HYDL"
file_dir_BenDi1 ="E:\\001.yangdebin\\001.集水区\\JC19_340000备份.gdb\\CHydDataset\\CV_HYDL"
# Make a layer and select cities which overlap the chihuahua polygon
arcpy.MakeFeatureLayer_management(file_dir_Source

该博客介绍了如何利用arcpy库在Python中进行地理国情监测的数据处理。首先,通过MakeFeatureLayer_management创建图层并使用SelectLayerByLocation选择位于指定区域内的要素。接着,用SelectLayerByAttribute进行属性选择,并反转选择。最后,当有匹配的要素时,使用CopyFeatures_management将选择结果导出到新的文件夹。这是一个GIS数据处理和分析的示例。
最低0.47元/天 解锁文章
2163

被折叠的 条评论
为什么被折叠?



