arcgis for python 使用os.walk 和da.walk读取gdb(mdb)

import arcpy.da as da

import os

print(“os walk”)

for dirpath, dirnames, filenames in os.walk(“C:\Users\Administrator\Documents\ArcGIS\Default.gdb”):

…     for filename in filenames:

…         print(filename)

print(“arcpy da walk”)

for dirpath, dirnames, filenames in da.Walk(“C:\Users\Administrator\Documents\ArcGIS\Default.gdb”,datatype=”FeatureClass”):

…     for filename in filenames:

…         print(os.path.join(dirpath, filename))

转载自:https://blog.csdn.net/sinat_25006091/article/details/82940606

You may also like...