# 需要导入模块: import arcpy [as 别名]# 或者: from arcpy importListFeatureClasses[as 别名]defget_feature_classes(self):"""Get geodatabase feature classes as ordered dicts."""fcs = []ifself.arcpy_found: arcpy.env.workspace = self.path# iterate feature classes within feature datasetsfds = ...
arcpy.ListFeatureClasses函数的性能测试的代码如下: importarcpyimporttimedata=r"C:\MapPrintTest\data_test\testgdb.gdb"point=r"C:\MapPrintTest\data_test\test.gdb\gps222"arcpy.env.workspace=dataforiinrange(0,500):name="point"+str(i)arcpy.FeatureClassToFeatureClass_conversion(point,data,name)ifi...
The list containing feature class names is returned from the function, limited by the optional wild_card, feature_type, and feature_dataset arguments. コードのサンプル ListFeatureClasses example Copy shapefiles to a geodatabase. import os import arcpy # Set the workspace for ListFeatureClasses...
arcpy.CopyFeatures_management( fc, os.path.join("c:/base/output.gdb", os.path.splitext(fc)[0])) importarcpyimportos arcpy.env.workspace ="c:/base/gdb.gdb"datasets = arcpy.ListDatasets(feature_type='feature') datasets = [''] + datasetsifdatasetsisnotNoneelse[]fordsindatasets:forfcinarc...
The list containing feature class names is returned from the function, limited by the optionalwild_card,feature_type, andfeature_datasetarguments. Code sample ListFeatureClasses example Copy shapefiles to a geodatabase. importosimportarcpy# Set the workspace for ListFeatureClassesarcpy.env.workspace=...
featureclasses = arcpy.ListFeatureClasses("t*","point") outpath=r'D:\ncc_datas\datapre\tmax\shiyan' mask=r'D:\ncc_datas\datapre\maizeaa\m2005.shp' outpathb=r'D:\ncc_datas\datapre\tmax\excel_2005' for featureclass in featureclasses: ...
import arcpy featureclass = "c:/data/roads.shp" # Get list of indexes for roads.shp and print properties indexes = arcpy.ListIndexes(featureclass) for index in indexes: print("Name : {0}".format(index.name)) print("IsAscending : {0}".format(index.isAscending)) print("IsUnique : {...
print len(arcpy.ListFields(r"C:\Users\***\Desktop\Data2\State.gdb\Counties","*")) Place the cursor at the end of the expression and press Enter. The image below shows the total number of fields for the Counties feature class is 5. 文章ID: 000022586 接收通知并查找新问题...
# 需要导入模块: import arcpy [as 别名]# 或者: from arcpy importListTables[as 别名]defmain():arcpy.env.workspace =r"in_memory"arcpy.AddMessage("Deleting in_memory data...") list_fc = arcpy.ListFeatureClasses() list_tbl = arcpy.ListTables()### for each FeatClass in the list of fcs...
I tried different statements for “out_feature_class” with no luck, sometimes the code fails to run or it copies a single F.C only. import arcpy ,sys adminconn=r'C:\1\b2.sde' gdbFile=r'c:\1\x.gdb' arcpy.env.workspace=adminconn arcpy.env.overwriteOutput=True SDEfcList=arcpy.List...