dtm文件生成等高线 lisp_CAD制图中的等高线拟合lisp程序

(defun c:ni()

(load"qx")

(command"layer""unlock" "dgx" "")

;(command"zoom" "e")

(c:LWPOLYLINE)

(setq ent (ssget "x" '((8 . "dgx")(0 . "POLYLINE"))))

(if ent (progn

(setq long-ent (sslength ent))

(setq num-ent 0)

(write-line"n   ***正在拟合等高线.....")

(repeat long-ent

(setq ty (ssname ent num-ent))

;(Setq ty (car (entsel)))

(c:get-yuanma)

(c:get-listnew)

(c:regen-line)

(setq num-ent (1+ num-ent))

)

(write-line"n  拟合完毕,请检查大拐弯处是否有点线矛盾!")

);progn

(write-line"n 图形中没有等高线")

);if

(print)

)

(defun c:get-yuanma()

(command"pedit" ty "d" "")

(c:max-min)

(Setq data-dgx (entget ty))

(setq tc (assoc 8 data-dgx)

line-type (assoc 6 data-dgx)

width (cdr (assoc 40 data-dgx))

thi (cdr (assoc 39 data-dgx))

color (cdr (assoc 62 data-dgx))

)

)

(defun c:LWPOLYLINE()

(setq ent (ssget"x" '((8 . "dgx")(0 . "LWPOLYLINE"))))

(if ent (progn

(setq long-ent (sslength ent))

(setq num-ent 0)

(repeat long-ent

(setq ty (ssname ent num-ent))

(command"pedit" ty "f" "")

(setq num-ent (1+ num-ent))

)

))

)

(defun c:get-listnew() ;减掉过密顶点

(setq long-new (length list-p))

(Setq p-listnew (list (car list-p)))

(setq num-new 0 k 0)

(setq p1 (nth num-new list-p))

(setq num-new (1+ num-new))

(while (setq p2 (nth num-new list-p))

(setq dis (distance p1 p2))

(if (< dis 5.0) (progn

(setq num-new (1+ num-new))

(while (and (< dis 5.0)(> long-new num-new))

(setq p2 (nth num-new list-p))

(setq dis (distance p1 p2))

(setq num-new (1+ num-new))

)

(setq p-listnew (append p-listnew (list p2)))

);progn

(setq p-listnew (append p-listnew (list p2)))

)

(setq p1 p2)

(setq num-new (1+ num-new))

);while

(setq d-end (distance (last p-listnew) (last list-p)))

(if (/= 0 d-end)

(setq p-listnew (append p-listnew (list (last list-p))))

)

);defun

(defun c:regen-line()

(command"erase" ty "")

(command "pline")

(apply 'command p-listnew)

(command "")

(command"pedit" (entlast) "w" width "s" "")

(command"change" (entlast) "" "p" "t" thi "")

(setq data-line (entget (entlast)))

(setq tc-old (assoc 8 data-line)

line-typeold (assoc 6 data-line)

)

(setq da (subst line-type line-typeold data-line))

(entmod da)

(setq da (subst tc tc-old data-line))

(entmod da)

(if color (command"change" (entlast) "" "p" "c" color ""))

)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Cesium等高线分析是一种地球科学常用的空间数据分析方法,主要用于研究地表高程变化。它通过建立坐标系和测量高程数据来描绘地表的形态特征,并通过绘制等高线图展示高程的分布情况。 Cesium等高线分析的核心是通过测量不同位置的高程数据,以划分等高面来呈现地表高程的变化。首先,需要通过各种地面测量技术收集到不同位置的高程数据。这些数据可以使用全球定位系统(GPS)、激光雷达、航空摄影测量等方法获取。 然后,将收集到的高程数据制作成数字地形模型(DTM),并将其导入Cesium等高线分析软件。利用该软件的工具,可以根据高程数据的分布情况绘制等高线图。等高线等高线代表了地表上具有相同高程数值的点,通过绘制这些等高线,可以清晰地展示地表的高程分布情况,从而帮助我们更好地理解和分析地形。 Cesium等高线分析在地质勘探、土地资源规划、城市规划等领域有着广泛的应用。例如,在地质勘探等高线分析可以帮助确定地下矿产资源分布的变化趋势;在土地资源规划,可以利用等高线图来评估土壤的适宜性,选择适的农作物种植区域;在城市规划,可以利用等高线图来分析城市地势,从而规划道路和建筑物的布局。 总的来说,Cesium等高线分析是一种重要的空间数据分析方法,它通过绘制等高线图来展示地表高程的分布情况,为地球科学研究和相关领域的决策提供了有力的支持。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值