Questions tagged «workspace»

2
使用ArcPy列出文件夹中多个地理数据库中的要素类?
我有一个包含大量地理数据库的文件夹。地理数据库中包含要素类。我想使用Python脚本获取这些地理数据库中要素类的列表。到目前为止,我只列出了地理数据库。有没有人建议在地理数据库中列出要素类? 我的脚本中的打印项目行为我提供了以下结果: C:\output\data.gdb C:\output\otherdata.gdb C:\output\somethingelse.gdb 我想在上面的地理数据库中生成要素类的列表。以下是到目前为止的脚本。 import arcpy, os, sys from arcpy import env arcpy.env.workspace = "D:\\output" inWorkspace = arcpy.env.workspace workspaces = arcpy.ListWorkspaces("*", "FileGDB") for item in workspaces: print item #This part gives me the print statements I shared above # fcList = arcpy.ListFeatureClasses() #I haven't figured this part out …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.