没有建立对应dataset,直接生成featureclass,主要是工作中没几个dataset。
# -*- coding: utf-8 -*-
__author__ = 'tanshuai'
import arcpy
from arcpy import env
env.workspace = u"E:/工作文档/常州平台/政务版/数据/常州政务版成果整理/a_Map/CZDLG20130913.gdb"
output = u"E:/工作文档/常州平台/政务版/数据/clipdata.gdb"
clipFeature = u"E:/工作文档/常州平台/政务版/数据/clipFeature.shp"
datasetList = arcpy.ListDatasets(None,"Feature")
#for ds in datasetList:
fcList = arcpy.ListFeatureClasses(None, "All", u"植被与土质")
for fc in fcList:
print('begin clip '+fc)
# print(output+"/"+fc)
arcpy.Clip_analysis(fc,clipFeature, output+"/"+fc)
print('end clip '+ fc)
print ('finished')