資源簡介
通過Python給Shape文件添加字段,需要ArcGIS 10.0 以上版本支持
代碼片段和文件信息
import?arcpy
import?arcpy?as?ARCPY
import?arcpy.management?as?DM
import?ErrorUtils?as?ERROR
import?SSUtilities?as?UTILS
import?SSDataobject?as?SSDO
from?arcpy?import?env
import?arcpy.cartography?as?CA
import?os
#Note:This?script?is?used?to?add?judge?fields
#if?this?script?is?runned?in?arctoolbox
#set?argis?geoprocessing?run??in?progress?window??to?make?better?performace
#otherwiseset?argis?geoprocessing?run?in?background.
#before?running?this?script?you?need?to?close?other?ArcGIS?processes
#and?close?all?related?shapefile.
#Author:luochunlinecitluo@163.com
#InputFeature?=?“D:\\aaa\\test.shp“
InputFeature?=?arcpy.GetParameterAsText(0)
#OutputFolder?=?arcpy.GetParameterAsText(1)
if?not?os.path.exists(‘d:/a‘):
????os.makedirs(‘d:/a‘)
if?not?os.path.exists(
- 上一篇:獲取win系統常用參數
- 下一篇:Python xlwt 創建xls文件
評論
共有 條評論