ArcGIS Python获得一个数据库所有要素类

import arcpy
import os
arcpy.env.workspace = "E:\\BaiduNetdiskDownload\\GeoScene Pro入门课程数据(1)\\data1-10\\data1-10\\第八章\\北京要素.gdb"
datasets = arcpy.ListDatasets(feature_type='feature')
datasets = [''] + datasets if datasets is not None else []
for ds in datasets:
    for fc in arcpy.ListFeatureClasses(feature_dataset=ds):
        path = os.path.join(arcpy.env.workspace, ds, fc)
        print(path)

修改

import arcpy
import os
arcpy.env.workspace = "E:\\BaiduNetdiskDownload\\GeoScene Pro入门课程数据(1)\\data1-10\\data1-10\\第八章\\北京要素.gdb"
datasets = arcpy.ListDatasets(feature_type='feature')
datasets = [''] + datasets #if datasets is not None else []
for ds in datasets:
    for fc in arcpy.ListFeatureClasses(feature_dataset=ds):
        path = os.path.join(arcpy.env.workspace, ds, fc)
        print(path)

Original: https://www.cnblogs.com/gisoracle/p/16504275.html
Author: gisoracle
Title: ArcGIS Python获得一个数据库所有要素类

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/9248/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

最近整理资源【免费获取】:   👉 程序员最新必读书单  | 👏 互联网各方向面试题下载 | ✌️计算机核心资源汇总