面朝大海,春暖华开

focus on scientific computue, 3dgis, spatial database
专注于科学计算、GIS空间分析

 

arcgis arcmap使用 Python 加载 CAD 数据

 arcgis操作、制图、开发、分析、培训、研发、单位机构和重大科技项目技术咨询,qq group ArcGisky: 878796212

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")

arcgis操作、制图、开发、分析、培训、研发、单位机构和重大科技项目技术咨询,qq group ArcGisky: 878796212

posted on   风过 无痕  阅读(594)  评论(0编辑  收藏  举报

(评论功能已被禁用)
编辑推荐:
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
历史上的今天:
2018-10-09 ArcGIS中的WKID(转)
2018-10-09 c#二维码资料
2018-10-09 How to remove live visual tree?
2006-10-09 mos开发系列教程九:关于中文化

导航

统计

向日葵支付宝收钱码
点击右上角即可分享
微信分享提示