基于AUTOCAD二次开发数字高程模型DEM的建立及应用程序开发

 2022-04-27 08:04

论文总字数:24782字

摘 要

数字高程模型在测绘、土地规划以及地学分析等领域都有着广泛的应用。AutoCAD作为一种常用的计算机辅助软件,其在传统测绘行业中的运用也非常频繁。但由于其在测绘作图中的专用化程度不够,所以对其进行二次开发得到测绘专用的插件就非常有必要。

本文采用C#语言对AutoCAD进行二次开发,主要实现以下功能:

(1)构建DEM模型:采用三角网生长法,建立首三角形,逐步向外拓展完成三角网的构建,并将三角网进行边界裁剪。

(2)等高线的生成:在DEM模型的基础上,生成等高线,利用二次样条法对等高线进行平滑处理。

(3)绘制纵断面:指定起终点,作一条线段,寻找其与等高线的交点,以交点离起点的距离为横坐标,高程为纵坐标,绘制纵断面。

(4)土方计算:针对不同三角形采取不同方法进行计算,将所有三角形的土方量求和得到整体土方量。

(5)高程内插:在DEM模型中插入任意一点,根据其所在的三角形顶点,采取线性内插方法进行计算高程。

(6)三角形定位:采用基于重心位置的最速方向法,快速定位任意点位于哪个三角形中。

关键词:数字高程模型,不规则三角网,AutoCAD,二次开发

ABSTRACT

Digital elevation models are widely used in surveying and mapping, land planning and geoscience analysis. As a common computer aided software, AutoCAD is also used frequently in traditional surveying and mapping industry. However, due to its lack of specialization in surveying and mapping, it is very necessary to develop a special plug-in for surveying and mapping. This paper uses C # language to redevelop AutoCAD, which mainly realizes the following functions:

(1) Constructing DEM model: using triangle network growth method, establishing the first triangle, gradually expanding outward to complete the construction of triangle network, and trimming the boundary of triangle network.

(2) Contour generation: On the basis of DEM model, contour is generated and smoothed by quadratic spline method.

(3) Drawing profiles: specify the starting and ending points, make a line segment, find the intersection point with the contour, take the distance between the intersection point and the starting point as abscissa, and take the elevation as ordinate, draw profiles.

(4) Earthwork calculation: According to different triangles, different methods are adopted to calculate, and the total earthwork is obtained by summing up the earthwork of all triangles.

(5) Elevation interpolation: insert any point in DEM model, and calculate elevation by linear interpolation method according to the triangle vertex.

(6) Triangle location: The fastest direction method based on the position of center of gravity is used to locate any point in which triangle is located.

KEY WORDS: Digital Elevation Model, Irregular Triangular Network, AutoCAD, Secondary Development

目 录

摘 要 I

ABSTRACT II

第一章 绪论 1

1.1研究背景与意义 1

1.2国内外研究现状 2

1.3论文组织结构 3

第二章 DEM构建原理 4

2.1 DEM的主要表示模型 4

2.1.1 规则格网模型 4

2.1.2 等高线模型 5

2.1.3 不规则三角网模型 6

2.2 Delaunay三角剖分 7

2.3 Delaunay三角网经典算法 8

2.3.1 分而治之算法 9

2.3.2 逐点插入算法 9

2.3.3 三角网生长算法 10

2.4 本章小结 11

第三章 AutoCAD二次开发方法 12

3.1 AutoCAD简介 12

3.2 二次开发方法 12

3.2.1 AutoLisp/Visual Lisp 13

3.2.2 ADS 13

3.2.3 QbjectARX 13

3.2.4 VBA 14

3.2.5 .NET 14

3.3 .NET开发方法 14

3.3.1 环境配置 14

3.3.2 对象服务 15

3.4 本章小结 16

第四章 程序设计 17

4.1 需求分析 17

4.1.1 开发背景 17

4.1.2 功能分析 17

4.2 程序流程 18

4.3 三角网构建 19

4.4.1数据结构 19

4.4.2首三角形 19

4.4.3三角形拓展 20

4.4 边界裁剪 21

4.4.1 内部边界裁剪 22

4.4.2 外部边界裁剪 22

4.5 等高线生成 24

4.5.1 程序流程 24

4.5.2 判断等高点是否经过三角形 26

4.5.3 等高点的内插 27

4.5.4 等高线的追踪 27

4.5.5 等高点的平滑 27

4.6 任意点的坐标显示 29

4.7 已知点的位置确定 30

4.7.1 三角形快速检索 30

4.7.2 点与三角形位置判断 31

4.8 绘制纵断面图 31

4.9 土方计算 33

4.10 本章小结 34

第五章 总结与展望 35

5.1 总结 35

5.2 展望 35

致 谢 37

参考文献 38

绪论

为了能更好地认识和改造生存环境,人类一直在尝试着用一种更好的方法来描述地理环境,在这其中地形图是一种比较常规的手段[1]。地形图作为一种国家基础资源,在国家进行基础设施建设和资源开发规划中起着重要作用,而且地形图在军事上的运用也日渐成熟[2]。自20世纪40年代以来,计算机图形学的发展异常迅猛,因此在测绘领域,图形表达开始从抽象表达方式转向数字化表达方式,数字高程模型作为一种新兴的技术,开始逐渐受到重视。

1.1研究背景与意义

数字地面模型的概念于1958年提出,随着后期的理论发展,数字地面模型的理论逐渐成熟,数字地面模型(DTM,Digital Terrain Mode)是将地球表面的信息进行数字化存储,采用数字化信息对地表空间分布进行描述,简而言之就是将地面信息进行数字化。如果只采用 DTM 的高程信息,DTM就会演化成为数字高程模型就(DEM,Digital Elevation Model) 。数字高程模型的概念是将有限的采样点采用某种规则连接成一系列的曲面或平面片来逼近原始曲面[3]

DEM作为一种新兴的技术,具有以下特点:

剩余内容已隐藏,请支付后下载全文,论文总字数:24782字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;