地球信息科学学报 ›› 2015, Vol. 17 ›› Issue (12): 1483-1489.doi: 10.3724/SP.J.1047.2015.01483

• 地球信息科学理论与方法 • 上一篇    下一篇

二维矢量线符号在三维地形表面的贴合渲染方法

谈心(), 佘江峰*()   

  1. 1. 南京大学地理信息科学系,南京 210023
    2. 江苏省地理信息技术重点实验室,南京 210023
  • 收稿日期:2015-10-10 修回日期:2015-11-09 出版日期:2015-12-20 发布日期:2015-12-20
  • 通讯作者: 佘江峰 E-mail:MG1327054@smail.nju.edu.cn;gisjf@nju.edu.cn
  • 作者简介:

    作者简介:谈心(1990-),男,江苏南京人,硕士生,研究方向为三维GIS及其应用。E-mail:MG1327054@smail.nju.edu.cn

  • 基金资助:
    国家自然科学基金项目(41371365)

A New Method of Rendering 2D Vector Line Symbols on 3D Terrain Surface

TAN Xin(), SHE Jiangfeng*()   

  1. 1. Department of Geographic Information Science, Nanjing University, Nanjing 210023, China
    2. Jiangsu Provincial Key Laboratory of Geographic Information Science and Technology, Nanjing 210023, China
  • Received:2015-10-10 Revised:2015-11-09 Online:2015-12-20 Published:2015-12-20
  • Contact: SHE Jiangfeng E-mail:MG1327054@smail.nju.edu.cn;gisjf@nju.edu.cn
  • About author:

    *The author: CHEN Nan, E-mail:fjcn99@163.com

摘要:

二维矢量符号是二维地图的重要组成部分。如何将二维矢量符号准确地贴合渲染在三维地形模型表面是地理信息科学的研究热点之一。针对线状矢量要素(简单线和周期线)中现有方法存在的周期线周期分布不均、渲染精度低、性能受地形模型复杂度影响大、矢量要素与地表贴合不紧密等问题,本文提出了一种基于屏幕像素进行投影反算的渲染方法,以及基于地表延伸长度的周期判断方法。该方法通过预处理计算线要素贴合在地表的真实长度,并将线要素按其实际宽度进行面域化处理;实时计算每个屏幕像素在二维矢量平面内的覆盖范围,通过该范围与矢量面域的位置关系筛选位于其内部的像素;进一步通过线的实际长度进行周期判断以确定像素色彩值。整个过程通过CPU-GPU并行异构计算模型实现,提高了场景交互性能。实验表明,本方法具有周期分布均匀、渲染精度高、贴合结果真实准确和性能不受地形模型影响等优点。

关键词: GIS, 三维地图学, 矢量要素, 计算机图形学, 并行计算

Abstract:

Two-dimensional (2D) vector symbols are important components on 2D maps. How to accurately overlay the symbols on the three-dimensional (3D) terrain surface becomes one of the research hotspots in geoscience at present. This paper proposes a method for mapping the 2D vector lines (simple lines and periodically changed lines) onto the 3D terrain model based on the inverse projection of screen coordinates, with an additional period judgment based on the spread lengths of lines on terrain surface. The method solves some problems that might occur within other existing methods, for example: the poor rendering accuracy, being sensitive to terrain model complexity, not fitting in the terrain surface tightly, and so on. The key steps of the method include: calculating the spread length of the overlaid lines on terrain surface and extending them into polygons during pre-processing; projecting every screen pixel to the 3D world space and then to the 2D vector plane, and ruling out the pixels that are out of the range of the polygons; setting the color for each of the remaining pixels in terms of the result of period judgment based on the spread lengths of lines on terrain surface. Attribute to a CPU-GPU heterogeneous parallel model, the running performance is improved evidently. The lines can be authentically overlaid on the terrain model and with its running performance independent to the complexity of terrain model. The final rendering effect shows that the periodically changed symbols can be evenly distributed over the line with a high rendering accuracy on screen.

Key words: GIS, 3D cartography, vector data, computer graphics, parallel computing