您所在的位置:http://www.qk114.net > 论文 > 计算机论文 > 正文

基于VLISP对地形图中横断面的提取并生成横断面图的研究

 在实际放线工作中经常要测量横断面并生成横断面图,在测量横断面资料时按照传统的方法,在线路桩点处沿线路垂直方向进行左右测量,记录下来,然后在内业中按照各专业需求生成相应格式的横断面数据,继而生成横断面图。如果在工作中对这种传统的方法改进,会很大地节约外业时间。随着RTK等数字化仪器的广泛使用,其误差可完全满足规范有关横断面的10的限差要求,在测量横断面工作过程中,可不用考虑线路的走向,直接按测地形图的方法沿线路两侧需要的宽度范围内测量地形,然后内业中进行横断面的提取,且可利用程序直接生成横断面图脚本文件。当然如果已有工作区域内的1∶1000或1∶500数字化大比例地形图,我们也可直接从数字化图上进行横断面的内业提取。我们在工作中利用VLISP程序做了个小命令可以直接在内业中实现该需求。下面我们就该命令的实现结合实际放线工作进行阐述。
  1 地形图中的应用
  1.1 关键地形点及特殊地物的处理
  在外业工作中按地形走势测取关键地形点,在内业中将外业散点及纵断面面数据展于AUTOCAD中,然后生成三角网。在实际工作中经常遇到路基,堤坝,沟渠等特殊地物,在内业中可根据地形点单独生成三角网,将其颜色改成不同于普通地形点的三角网。
  1.2 横断面提取格式设定
  在生成的三角网图上开始横断面数据的提取,在本文中我们选取的横断面面格式如下。
  桩号,高程。
  左侧最远距离,高程。
  桩位处距离(0),高程。
  右侧最近处距离,高程。
  当然也可根据各种需要生成不同的格式文件,将生成横断面数据存储于所测的地形展点图形文件的相应文件夹中。
  1.3 对该VLISP命令的简要说明
  在实现该功能中利用AUTOCAD自带程序语言VLISP进行了命令的编写。具体命令如下。
  ln (strlen wjm)
  wjm (substr wjm 1 (- ln 4)))
  (setq wjm1 (strcat wjmlj wjm "横断面.txt"))
  (setq wjm2 (strcat wjmlj wjm "横断面图.scr"))
  (setq zg (getint " 输入横断图间隔: "))
  (setq zg1 (rtos zg 2 2))
  (setq zh (cdr (assoc 1 (entget (car (entsel " 拾取里程桩号:"))))))
  (setq pp1 (getpoint " 拾取该里程点位:"))
  (setq y1 (car pp1)
  x1 (cadr pp1)
  h1 (caddr pp1))
  (setq zhgc (rtos h1 2 2))
  (setq zhgc1 (rtos (+ h1 zg)))
  (setq zhgcw1 (rtos (+ h1 zg 2) 2 2)
  zhgcw2 (rtos (+ 0 10) 2 1))
  (command "osnap" "nod,nea,center" "")
  (setq i 1)
  (setq fn1 (open wjm1 "a"))
  (setq fn2 (open wjm2 "a"))
  (setq zhc " ")
  (write-line (strcat zh "," zhgc ) fn1)
  (write-line "layer m 横断面左侧 " fn2)
  (write-line "layer c 5 " fn2)
  (write-line (strcat "text m " "-10" "," zhgcw1 " " "2.5" " " zh ) fn2)
  (write-line (strcat "text m " zhgcw2 "," zhgcw1 " " "2.5" " " zhgc ) fn2)
  (write-line "pline" fn2)
  (command "-layer" "m" "横断面左侧" "c" "red" "" "" "")
  (while (and (< rq 20111018) (progn (initget 8 "x")
  (setq pp2 (getpoint " 从最远点依次指定左侧点:"))
  (command pp2)
  (if (= ''list (type pp2))
  (progn
  (setq yp1 (car pp2))
  (setq xp1 (cadr pp2))
  (setq hp1 (caddr pp2))
  (setq dys (- y1 yp1)
  dxs (- x1 xp1)
  dhs (- hp1 h1))
  (setq s1 (sqrt (+ (* dys dys) (* dxs dxs))))
  (setq ss1 (rtos s1 2 2)
  gc1 (rtos hp1 2 2))
  (setq sss1 (rtos (+ s1 zg) 2 2)
  gcc1 (rtos (+ hp1 zg) 2 2))

(setq sjj (strcat ss1 "," gc1))
  (setq zsj (strcat sjj ","))
  (write-line zsj fn1)
  (write-line (strcat "-" ss1 "," gcc1) fn2)
  (setq i (+ i 1))
  ) ) ) ) )
  (write-line (strcat "0" "," zhgc) fn1)
  (write-line (strcat "0" "," zhgc1 " ") fn2)
  (write-line "layer m 横断面右侧 " fn2)
  (write-line "layer c 3 " fn2)
  (write-line "pline" fn2)
  (write-line (strcat "0" "," zhgc1) fn2)
  (setq ii 1)
  (setq zhc "")
  (command "-layer" "m" "横断面右侧" "c" "blue" "" "" "")
  (command "pline" pp1 "w" "0" "0" )
  (while (progn (initget 8 "x")
  (setq pp3 (getpoint " 从第一点依次指定右侧点:"))
  (princ (strcat " ") fn2)
  (setq zjwz (list yp2 xp2))
  (command "-layer" "m" "间隔注记" "c" "red" "" "" "")
  (command "text" "j" "c" zjwz 5 0 zg)
  (CLOSE fn1)
  (close fn2)
  (command "-layer" "s" 0 "" "")

 
本站主营各类论文发表论文发表职称论文发表论文代写代发表服务!
加盟 加盟陈主编:QQ:22848269 咨询电话 垂询电话:13541216041 邮箱投诉邮箱:[email protected]
QQ客户 客服杨老师:QQ:61771950 咨询电话 垂询热线:02880885761 邮箱 咨询邮箱:[email protected]
QQ咨询 客服邓老师:QQ:61771951 咨询电话 垂询热线:02880885762 邮箱导咨询邮箱[email protected]
联系地址 联系地址: 四川大学望江校区 成都市一环路南一段24号 邮编: 610065
常年法律顾问支持:四川川达律师事务所 信息产业部备案:蜀ICP备08008442号
专业,诚信,快捷,权威的论文发表网