python调用arcgis功能一例
执行方法:
D:\data\python>python test_Select.py
window11下环境变量设置
此电脑/属性/系统/高级系统设置/高级/环境变量/path
path中添加全局目录:C:\Python27\ArcGIS10.4
test_Select.py脚本内容文章来源:https://www.toymoban.com/news/detail-607015.html
# Name: Select_Example2.py
# Description: Select roads of Class 4 from major roads tin the gnatcatcher habitat study area
# Import system modules
import arcpy
from arcpy import env
# Set workspace
env.workspace = "D:\data\python\shp"
# Set local variables
in_features = "DLTB2021.shp"
where_clause = '"DLBM" = \'0101\''
# create gdb file
arcpy.CreateFileGDB_management("D:/data/python/shp/output","dltb.gdb")
out_feature_class = "D:/data/python/shp/output/dltb.gdb/dltb_0101"
# Execute Select
arcpy.Select_analysis(in_features, out_feature_class, where_clause)
# execute .py script out result python test_Select.py
—the—end—文章来源地址https://www.toymoban.com/news/detail-607015.html
到了这里,关于python调用arcgis功能一例的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!