• 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)
  • 相关阅读:
    旺旺狗
    写在父亲离世周年
    老家老院
    玉米粒自传
    记念父亲
    26年前来蒙阴
    玉米粒自传
    pywin32安装
    linux中源码安装mysql
    在Linux上搭建禅道
  • 原文地址:https://www.cnblogs.com/gisoracle/p/16504275.html
Copyright © 2020-2023  润新知