您的位置:首页 > 其它

Arcpy 第一个函数式的写法[纪念]

2014-06-11 15:21 555 查看
import arcpy

def MDBToSHP(inMdb, outPath):
    arcpy.env.workspace = inMdb
    outLocation = outPath
    fcs = arcpy.ListFeatureClasses()
    fcCount = len(fcs)  
    for fc in fcs: 
        # Copy the features from the workspace to a folder
        arcpy.FeatureClassToShapefile_conversion(fc, outLocation)

        print fc
    print fcCount

inMDB = r"D:\07\07.mdb"
outLocation = r"D:\07"
MDBToSHP(inMDB, outLocation)
上一篇博客中有相似的非函数式的写法
                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: