zoukankan      html  css  js  c++  java
  • arcgis arcmap使用 Python 加载 CAD 数据

     

    arcgis arcmap使用 Python 加载 CAD 数据

    可以使用 Python 脚本将 CAD 数据加载到地理数据库中。此 Python 实例演示如何使用"合并"工具将多个 CAD 工程图中的折线加载到单个要素类中。

    # Name: ImportCADandMerge.py

    # Description: Imports and merges polylines from one workspace into a single feature class

     

    # Import system modules

    import arcpy

    from arcpy import env

     

    env.workspace = "c:/data/columbia"

     

    # Create a value table that will hold the input feature classes for Merge

    vTab = arcpy.ValueTable()

     

    # Step through each dataset in the list

    for fd in arcpy.ListDatasets("*", "CAD"):

    layername = fd + "_Layer"

    # Select only the Polyine features on the drawing layer b-railroad

    arcpy.MakeFeatureLayer_management(fd + "/Polyline", layername, ""Layer" = 'B-RAILROAD'")

    vTab.addRow(layername)

     

    # Merge the CAD features into one feature class

    arcpy.Merge_management(vTab, "c:/data/columbia/Columbia.gdb/Railroads")

  • 相关阅读:
    最大公约数
    九宫格
    Hanoi双塔问题(简单的枚举)
    最高分
    盒子
    CodeForces Round #303 Div. 2
    关于“被密码保护”的文章
    【学习】组合数的递推公式
    [FZYZOJ 1821] 一道果题
    [FZYZOJ 1889] 厨房救济
  • 原文地址:https://www.cnblogs.com/xiexiaokui/p/13789396.html
Copyright © 2011-2022 走看看