A Screen-based Method for Rendering 3D Linear Map Symbol

  • LIU Junyan ,
  • CHEN Yaqian ,
  • GAO Yiyuan ,
  • LI Chuang ,
  • SHE Jiangfeng , *
Expand
  • School of Geography and Ocean Science, Jiangsu Provincial Key Laboratory of Geographic Information Science and Technology, Nanjing University, Nanjing 210023, China
*Corresponding author: SHE Jiangfeng, E-mail:

Received date: 2018-01-23

  Request revised date: 2018-05-17

  Online published: 2018-08-24

Supported by

National Natural Science Foundation of China, No.41371365.

Copyright

《地球信息科学学报》编辑部 所有

Abstract

Vector data, as an important part of Geographic Information System (GIS), plays a significant role in three-dimensional(3D) GIS to indicate geographic objects, explain spatial relationships and enrich map information. However, in the study of 2D vector rendering onto 3D terrain surface, vector lines drawn by traditional algorithms are relatively simple and monotonous, mainly shown as monochromatic lines or multicolor parallel lines, which cannot meet the growing demands for visualization. With the rapid development of graphics hardware acceleration and the widespread application of Virtual Geographical Environment (VGE), in order to draw the complicated linear map symbol in 3D map effectively and efficiently, this paper proposes a screen-based method that renders the linear symbol onto the 3D terrain surface with the use of OpenGL Shader Language (GLSL). We transfer the vector data from the procedure to Graphics Processing Unit (GPU) by encoding the vector data into the texture data. The mapping relationships between terrain units and vector lines are stored in the index texture, and the mapping is used for looking up the related line segments in real-time. In addition, the node texture stores the attribute of vector lines. We calculate the position relationship between screen fragments and related line segments, and find out the area where the current fragment belongs to. If the current screen fragment has associated line segments, then we get the attributes of the related line segments from the node texture and set the fragment color. It is worth mentioning that we provide a variety of symbolic functions, which can render different types of vector line segments, including gradient lines, periodic lines, etc. In order to achieve better visual effects, we apply a series of detail optimization operations to related line segments, including anti-aliasing and corner optimization. Finally, we take the Purple Mountain as an example and render vector lines onto it using the proposed method. The experiments demonstrated that vector lines rendered by our method show great visual effect and our method can render some complicated and typical line symbols with high performance while keeping rendering efficiency at real time level.

Cite this article

LIU Junyan , CHEN Yaqian , GAO Yiyuan , LI Chuang , SHE Jiangfeng . A Screen-based Method for Rendering 3D Linear Map Symbol[J]. Journal of Geo-information Science, 2018 , 20(8) : 1047 -1054 . DOI: 10.12082/dqxxkx.2018.180070

1 引言

在三维地形表面渲染矢量线的研究已经发展十多年,形成了一系列成熟的算法,这些算法在提高三维地图的可读性方面发挥了重要的作用[1,2,3,4]。但是,传统算法绘制出来的矢量线样式较为简单,以单色线或者多色平行线为主[5,6]。随着三维可视化分析需求的快速发展[7,8,9],简单样式的矢量线难以满足在表达多类型、多属性矢量要素方面的需求,例如不同类型、等级的道路或深度变化的河流[10,11,12]。三维场景中的矢量线也需要考虑形状、颜色、透明度等视觉因素,以实现细节程度更为丰富的可视化效果,这就对矢量线的渲染提出了新的要求。如何在三维地形表面准确绘制出复杂的线状符号逐渐成为当前的研究重点之一。
传统的矢量线渲染算法主要可以分为基于纹理、基于几何和基于屏幕的方法[13,14]。基于纹理的方法[13]将矢量线栅格化为纹理,再将该纹理映射到地形表面。该方法不受地形复杂度的制约,但是由于纹理分辨率的限制,在场景放大时可能会出现锯齿现象。此外,当纹理投影在陡峭的山坡上时,纹理投影变形会使符号周期产生突变。Taibo等[14]针对基于纹理方法中矢量线断续、锯齿等现象,提出了一种在保持线段连贯性的基础上实现线段曲面细分的方法。基于几何的方法[15,16]将矢量线与地形作为2个独立的模型分开处理,虽然渲染效率很高,但是在场景缩放时难以保证矢量数据和地形的精确贴合,会出现悬浮、穿刺等现象。Wu等[11]提出了一个基于矢量线曲面细分的渲染方法,将折线分为平滑和突变部分,根据折线特征,使用不同的细分方案将折线划分为几何图元,可获得高效且高质量的渲染结果。近年来,基于屏幕的算法也得到了重视,其中以Schneider于2007年首次提出的模板阴影体算法(SVA)为代表[17]。SVA首先将矢量线段扩展为对应的多面体,利用光线追踪算法为不同颜色区域建立模板,实现像素级的符号绘制。然而,复杂的多面体构建和模板生成使得阴影体算法在处理大规模复杂符号时效率很低[18]。曹雪峰等[19]在已有的理论基础上,通过研究线状符号边缘的平滑和符号交接处的优化对模板阴影体进行了扩展。She等[20]提出一种新的基于屏幕的方法,其优势在于不需要将矢量线段扩展为多面体,而是直接通过坐标反算,建立像素点到多边形的联系,改善了渲染效果。
本文提出的基于屏幕的三维地形表面线状符号渲染方法,与传统基于屏幕的方法[17]相比,在地形渲染过程中而不是地形渲染之后完成符号的绘制。为了在地形模型的着色器计算线状符号,以纹理图像为载体将矢量数据和索引信息从主程序传输到着色器中。考虑到矢量线的坐标始终为模型坐标,在顶点着色器中记录地形的模型坐标,统一地形片元与矢量线的坐标系,直接计算片元与矢量线段的位置关系,避免了复杂的投影反算或者光线跟踪过程[21,22,23]。在片元位置基础上,计算当前片元的颜色值。此外,通过一系列片元操作可以灵活处理拐角、暗边、锯齿等问题,实现符号的高精度绘制。

2 研究方法

2.1 技术路线

本方法的主要思路如图1所示,对矢量数据进行编码形成节点纹理和索引纹理,并将其传输到着色器中。其中,节点纹理包含几何信息和属性信息,用于最终像素颜色的计算,索引纹理存储与当前片元相关联的线段索引。通过查找与当前片元相关联的线段,可根据线段的属性信息选择应用合适的符号函数。
Fig. 1 Technology roadmap

图1 技术路线图

2.2 节点与索引纹理生成

考虑到地形像素点的计算是在地形着色器中,解决矢量数据在程序和着色器间的传输变得尤为重要。Shader Language提供了attribute和uniform 2种变量进行数据传递。Attribute变量用于逐顶点向顶点着色器中传递数据,由于地形顶点数量庞大,建立矢量节点和地形顶点的映射关系代价昂贵。此外,Attribute变量携带数据量有限难以在着色器中重建矢量线段。本文定义一个uniform变量texture sampler来传输矢量数据,可以批量向着色器传输数据。
矢量线的基本单元是节点,每个节点具有全局和独有属性,全局属性是指节点所属矢量线的属性,独有属性是指节点本身的属性。对符号绘制产生影响的属性都被选中,包括矢量线ID、类型、坐标、累积长度、优先级、透明度系数、宽度系数等。由于纹理像素格式的限制,一个纹理像素只能存储3个属性,因此选择三维纹理来实现矢量数据的有序存储,同一节点的属性存放在纹理不同深度的相同位置(图2)。
Fig. 2 Storage of vector line attribute

图2 矢量线属性存储

选定属性并参数化后,创建一个一维数组作为纹理图像的数据源。假设图像的长度、宽度、深度分别是widthVheightVdepthV,其中,长度与宽度的乘积应当大于等于节点数量,深度大小则取决于属性数量,数组大小SofA = widthV×heightV×depthV×3。矢量节点索引IndexV和数组下标SubofV的关系是:
SubofV = 3 IndexV + i × SofV / dept h V + j (1)
式中:i表示图像的深度;j表示每个像元中RGB的位置。通过循环遍历ij将节点属性存放到数组中,生成节点纹理。
为了在渲染时判断地形片元是否存在关联线段,建立地形单元和矢量线段的映射关系。首先,将地形划分为规则格网,一方面,为了减少线段在垂直方向上覆盖的单元,地形单元应大于符号宽度的一半;另一方面,单一地形单元的关联线段不宜过多,单元大小应尽可能小。因此,地形单元介于最大符号宽度和最大符号宽度的一半之间。
利用“point-in-rectangle”算法建立映射关系。由于线性符号具有一定宽度,符号经过区域的相邻区域也可能受到符号的影响,因此对每个符号而言,其索引会被赋予当前区域和相邻区域(图3)。单元行号NofRow、单元列号NofCol、数组下标SubofI以及图像宽度widthI、图像高度heightI之间的公式是:
SubofI = 3 NofRow × widt h I + NofCol + i × SofI / dept h I + j (2)
式中:ij和式(1)中类似,逐节点计算线段影响的地形单元行列号,填充数组,生成索引纹理。
Fig. 3 Affected area of vector line

图3 矢量线影响范围

2.3 关联线段查找

背景纹理和矢量线段影响片元的颜色值,背景纹理的采样相对容易,而量化矢量线的影响则是一个复杂的过程。不同于其它方法,本方法是在渲染过程中重建矢量线。片元的关联线段是指经过或者影响到该片元所在单元的线段。如图4所示,根据地形单元的大小和片元的模型坐标计算像素点在节点纹理和索引纹理中所属的单元行列号,然后利用纹理查找函数在索引纹理中查找该地形块中是否存在关联线段,若索引纹理中的相应位置处索引值不为0则存在关联线段,否则不存在。同样,也可在节点纹理中查找相关属性信息。
Fig. 4 Index of related textures

图4 相关纹理索引

关联线段可能来自不同的矢量线,通过比较线段ID进行区分。如果它们来自不同的矢量线则比较它们的优先级,决定它们的绘制次序。对于1条具体的矢量线,通常情况下关联线段可能有1、2或3条。一条关联线段最容易处理,常常意味着该单元位于符号边缘或者长线段的中间处。2条关联线段的处理涉及到拐角的处理,具体解释在后文。当矢量线段很短时就可能出现3条关联线段的情况,它的处理可分解为两组两条关联线段的情况。

2.4 符号函数应用

根据矢量线段的类型选择对应的符号渲染函数,并以分组的关联线段索引号作为函数的输入参数。线段的索引号等于线段起始节点索引号,而终止节点的索引号比线段索引号大1。通过2个节点的索引号就可以直接在节点纹理中读取该线段几何和属性信息。
图5展示了边界符号的颜色计算过程,边界符号属于周期性符号,呈现黑白相间的样式,图中将边界符号分为黑色部分Rec1和白色部分Rec2,通过判断当前点所属区域选择合适的渲染方案。具体方法如下:首先,读取线段类型,并从预定义的样式表中确定当前线段的符号样式及渲染函数;其次,计算空间位置关系得到垂直距离H和累积长度L,通过比较H和符号宽度的一半确定该片元是否位于符号范围内。如果位于该符号范围内则继续进行计算,反之则将背景纹理的颜色赋予该片元,结束计算;最后,根据几何和颜色特征将符号分为多个规则区域,判断片元所属的区域,将该区域的颜色赋予该片元。如果片元找到多种符号,则根据优先级安排渲染次序。优先级低的符号先渲染,并用计算的颜色值更新采样得到的背景颜色值。
Fig. 5 Computational process of boundary symbol color

图5 边界符号颜色计算过程

在实际操作过程中,为了便于符号区域判断和抗锯齿,符号的划分应使符号的不同部分尽可能规则。考虑到符号不同部分会相互影响,有必要对不同部分的渲染次序进行规划,这对符号的精度有重要的影响。在一些实例中,还需要调整符号的宽度、透明度等参数来展现符号的多样性特征,这些因素也被整合到渲染函数中。

3 细节优化

3.1 符号周期

地形片元与其关联线段间的空间位置关系对于渲染线状符号至关重要。区别于其它基于屏幕的方法,本文方法不只判断片元是否落在拓展后的多边形或多面体内,而是在模型坐标系中准确计算片元和矢量线的距离,将每种线状符号按其符号特征划分周期,通过在模型坐标系中准确计算片元和矢量线的距离,包括片元到线段的垂直距离H及沿矢量线方向的累积距离L,确定当前片元在周期中的准确位置,实现符号周期计算。
图6解释了模型空间中HL的计算。点ABCD是矢量节点在三维空间中的位置,点A'B'、C'D'是它们在二维平面上的投影。同样的,PP'分别是地形片元在三维空间中的位置及二维平面上的投影。线段PGP'G'分别代表三维空间和二维平面上的H,当地形起伏较大时,采用三维空间中的H会引起断裂、扭曲等视觉误差。再考虑到线性符号的宽度相对较小,因此选取二维平面的H。对于没有颜色或形状变化的符号,选择三维或二维中的L没有明显的差别。但是许多线状符号有周期性变化,为避免周期变形,选取三维空间中的L作为实际计算值。综上,HL的计算公式为:
L = ( PB × CB / PB + Lengt h B ) % T H = P ' G ' (3)
式中:LengthB代表B到矢量线起始节点的累积距离;T表示该符号的最小重复周期。
Fig.6 Calculation of perpendicular distance and accumulative distance

图6 垂直距离和累积距离计算

3.2 反走样

传统的方法难以在符号和背景纹理间达到无缝融合的效果,在符号边缘和符号内部颜色变化处常常会出现锯齿现象。为了消除这种锯齿现象,谈心等利用屏幕多重采样对矢量线的渲染进行优化,但是主要是针对单色线进行的[24]。本方法采用 Hermite插值对符号边缘和颜色变化区域进行重采样,使符号的颜色过渡更加平滑。
符号边缘主要是背景纹理色和符号颜色的融合。定义一个重采样区域,其宽度与符号宽度H有关,具体的wRsample=abs(dH/dx)+abs(dH/dy)。其次,重新计算重采样区域内片元的颜色值。根据Hermite函数,符号颜色在边缘线两侧分布有如下特征:在符号范围内,符号颜色比例随远离边缘线先快速增加后缓慢增加;在符号范围外,符号颜色比例随远离边缘线先快速减少后缓慢减少。
符号内部锯齿的处理更为繁琐,一方面,锯齿现象出现在内部形状的每一条边上,难以进行统一处理;另一方面,部分内部形状不是简单规则的形状,这也大大增加了颜色重采样的复杂度。因此,消除内部锯齿的重点就在于提取出待重采样的小段,并计算出它们在局部坐标系中的函数关系式。图7的虚线部分展示了符号的重采样区域,这些区域均位于边界处或不同颜色的交界处,因此较为容易出现锯齿现象,需要对该区域进行重采样处理。
Fig. 7 Resample of symbol edge

图7 符号边缘重采样

3.3 转折处理

对线帽和线段连接进行处理已经是矢量线渲染的一个共识。本方法并未在预处理时将矢量线拓展为多边形,因此无法通过增加节点等方法处理线帽和线段连接。在着色器中利用几何操作处理线帽和线连接,过程与处理符号主体部分一致。线段连接一般有圆角和斜角2种,本文选择效果更好的圆角连接。注意到线帽可视为连接的一种特殊形式,不作专门处理。
当一个片元找到2条相邻线段时,就要处理线段相接。2条相邻线段组成的区域将被分解为4部分,如图8所示,包括第1条线区域DEFG,第2条线区域HIJK,角落区域BDH和重叠区域BEXK。除了H和L外,角度α1α2以及线段AP'1BP'2等参数也被用于判断像素点属于哪一区域。例如,落在角落BDH的像素点应该满足以下几个条件:AP'1长于AB,cosα2小于0,且BP'2小于BH(即线状符号宽度的一半)。确定扇形BDH的范围后,根据具体样式计算内部像素的颜色。
Fig. 8 Processing of line segment joints

图8 线段相接处理

图8可知,重叠区域BEXK既属于矩形DEFG,又属于矩形HIJK。实际计算时无需将其从这2个矩形中独立出来处理,而是采取重复计算的方式。具体而言,首先计算矩形DEFG内片元的颜色,此时矩形BEXK有了颜色;接着,计算矩形HIJK内部的颜色,BEXK的颜色会被更新;最后,计算矩形BEXK的颜色得到最终结果。

4 实验与分析

4.1 效果测试

为了检验算法的适用性和效果,利用C++和OpenSceneGraph实现本文提出的算法,并对多种线状符号进行测试,包括实线符号、虚线符号及渐变符号等。图9(a)展示了普通道路的渲染效果,它属于多色平行线,颜色变化主要出现在垂直方向上。由图可知,该道路精确地贴合在地形表面,完全避免了悬浮、穿刺等现象。此外,符号的重采样处理使得不同颜色及符号与背景间的过度非常自然,消除了符号的锯齿现象。虚线符号的效果如图9(b)所示,虚线符号在沿线方向上呈现出几何结构或颜色的周期性变化,计算距离时采用了三维累积距离,避免了周期分布不均的现象。渐变符号利用颜色、透明度以及宽度的变化表现矢量线属性的变化,如图9(c)所示,采用本文算法绘制的河流符号在透明度和宽度上逐渐变化,反映了河流宽度及深度的变化情况。
Fig. 9 Rendering effect of line symbols

图9 线状符号渲染结果图

图10为南京紫金山的场景效果图,该场景中包含了道路、铁路、规划线等6种线性符号。所有符号都精确地贴合在地形表面,不受地形数据的影响;对符号的周期、拐角、边缘及相交进行了有效处理,使符号的渲染质量大大提升。
Fig.10 Rendering effect of scene

图10 场景效果图

4.2 效率测试

为了验证提出算法的性能,对多组地形、矢量数据进行测试,硬件配置为:CPU为2.4 GHz Intel Xeon E5-2609,内存大小为16 G,GPU为NVIDIA Quadro 4000。根据实验结果,选取了窗口大小、地形节点数量、矢量节点数量、符号类型等因素进行效率测试。由于实时渲染帧率与场景的缩放程度密切相关,记录平均渲染帧率时以帧率较低时为准,具体结果如表1所示。
Tab.1 Comparison of average rendering frame rate

表1 平均渲染帧速对比

序号 窗口大小(宽×高,像元) 地形三角形数量/万条 矢量节点数量(多条矢量线) 符号类型 平均渲染帧速/fps
1 800×600 309.4 2 000 道路 165.1
2 1280×960 309.4 2 000 道路 89.2
3 1920×960 309.4 2 000 道路 60.7
4 1280×960 77.28 2 000 道路 112.4
5 1280×960 1239.68 2 000 道路 52.0
6 1280×960 309.4 800 道路 102.4
7 1280×960 309.4 10 000 道路 81.6
8 1280×960 309.4 2 000 单色线 97.3
9 1280×960 309.4 2 000 边界线 82.5
10 1280×960 309.4 2 000 组合 85.3
从实验1-3中可以看出,算法的渲染效率受到窗口大小的影响,窗口越大渲染效率越低,地形占据的屏幕片元数量随窗口的增加而增加,进而导致符号渲染时间的增加;实验2、4、5展示了地形分辨率对渲染效率的影响,随着地形节点的增加,渲染效率会明显降低;实验2、6、7比较了不同矢量线数据量的影响,渲染效率随矢量节点数量的增加而降低。矢量线越多,片元可能关联的线段也就越多;不同符号的复杂度不同,导致了对应的渲染函数繁简有异,如实验2、8、9所示,单色线、道路、边界线的渲染效率逐渐降低。但符号类型对渲染效率的影响并不如其他3个因素那么明显。实验10中包含不同的线状符号(图10),平均渲染达到了85.3 fps。特别地,在所有实验中,最低渲染帧速也到达了52.0 fps,满足实时交互的需求,证明了该算法在渲染效率方面的优势。

5 结论

本文提出一种新的在三维地形表面绘制复杂线性符号的算法,利用OpenGL Shader Language将符号的渲染融合到地形的渲染中,实验结果证明该算法能够有效提高符号的渲染质量,并且渲染效率达到了实时交互的级别。本算法的绘制效果不受地形起伏的影响,符号精确地贴合在起伏的地形表面。与传统矢量线渲染算法相比,本算法不仅消除了悬浮、穿刺、锯齿等不合理现象,而且绘制的符号在样式上更为复杂,可以区分表达不同类型、不同级别(如道路)的矢量要素。借助于GPU并行加速技术,本算法的渲染性能得到了极大的提升。实际渲染效率主要受到窗口大小、地形分辨率、矢量节点数量及符号类型等因素影响,前3个因素改变了计算的屏幕片元数量,而符号类型则与着色器中的计算复杂度有关。
下一步的研究重点是解决当视线远离符号时短细元素出现断续的现象,引起这个现象的主要原因是这种情况短细元素占据的面积小于一个屏幕像素。此外,进一步研究表现动态变化的矢量要素,为可视化分析、动态变化等提供丰富的视觉效果。

The authors have declared that no competing interests exist.

[1]
程朋根,龚健雅,眭海刚.GIS中地图符号设计系统的设计与实现[J].中国图象图形学报,2000,5(12):1006-1011.为了研制国产GIS软件――Geostar地图符号设计子系统.采用面向对象的方法,对符号分类组织、图素类设计、符号库结构、符号设计软件及空间信息符号化动态库等进行了设计与软件开发,所研制的软件成功地对国家标准系列地形图图式进行了设计,可满足实际生产的需要.介绍了符号设计子系统设计与开发过程中面向对象方法的应用与技术问题.研究表明,采用面向对象的方法来开发地图符号设计软件,技术思路正确,所开发的软件具有良好的封装性,便于维护和扩充.

DOI

[ Cheng P G, Gong J Y, Gui H S.Design and implement of map symbol design system in GIS[J]. Journal of Image and Graphics, 2000,5(12):1006-1011. ]

[2]
陈鸿,汤晓安,谢耀华,等.基于视点相关透视纹理的矢量数据在三维地形上的叠加绘制[J].计算机辅助设计与图形学学报,2010,22(5):753-761.

[ Chen H, Tang X A, Xie Y H, et al.Rendering vector data over 3D terrain with view-dependent perspective texture mapping[J]. Journal of Computer-Aided Design & Computer Graphics, 2010,22(5):753-761. ]

[3]
Qiao Z, Weng J, Sui Z, et al.A rapid visualization method of vector data over 3D terrain[C]. International Conference on Geoinformatics. IEEE, 2011:1-5.

[4]
朱庆. 三维GIS及其在智慧城市中的应用[J].地球信息科学学报,2014,16(2):151-157.三维GIS是当今乃至未来GIS技术的主要标志性内容之一,它突破了空间信息在二维地图平面中单调表现的束缚,为各行各业以及人们的日常生活提供了更有效的辅助决策支持。本文重点介绍了三维GIS的数据模型、数据库管理和可视化分析等关键技术及其研究进展,并以武汉市为例展示了三维GIS对城市立体空间的整体表达,为大城市、全市域的三维数字城市建设奠定了基础,最后探讨了在智慧城市建设与城市安全中三维GIS将发挥日益重要的时空信息承载引擎与空间智能技术支撑作用。

DOI

[ Zhu Q.Full three-dimensional GIS and its key roles in smart city[J]. Journal of Geo-information Science, 2014,16(2):151-157. ]

[5]
Schneider M, Guthe M, Klein R.Real-time rendering of complex vector data on 3D terrain models[C]. Proceedings of the 11th International Conference on Virtual Systems and Multimedia. IEEE, 2005:573-528.

[6]
Kersting O, Dollner J.Interactive 3D visualization of vector data in GIS[C]. Proceedings of the 10th ACM International Symposium on Advances in Geographic Information Systems. ACM, 2002:107-112.

[7]
Zhu J, Zhang A L, Yin L Z, et al.3D GIS modeling of virtual high-speed railway scene based on ArcGlobe[C]// In Proceedings of the 7th International Conference on Image and Graphics. IEEE, 2013:811-815.

[8]
Liang J M, Gong J H, Li W H, et al.A visualization-oriented 3D method for efficient computation of urban solar radiation based on 3D-2D surface mapping[J]. International Journal of Geographical Information Science, 2014,28(4):780-798.

DOI

[9]
Lin T P, Lin H, Hu M Y.Three-dimensional visibility analysis and visual quality computation for urban open spaces aided by Google SketchUp and WebGIS[J]. Environment & Planning B, 2017,44(4):618-646.

[10]
Yue S S, Yang J S, Chen M, et al.A function-based linear map symbol building and rendering method using shader language[J]. International Journal of Geographical Information Science, 2016,30(2):143-167.Maps are widely used to visualize geo-information so that map users can develop related understandings about the real world. Such a process for communicating information is largely dependent on the rendering of map elements using different symbols (points and linear and area symbols). To meet the demand of more dynamic and comprehensive visualization in map rendering, it is essential to improve the rendering efficiency. This paper focuses on these research topics, especially the difficulty in constructing and drawing linear map symbols. By employing shader language, a function-based linear symbol building and rendering method is presented in this paper. The basic idea of this function-based method is to build a map-rendering solution that employs graphic processing unit (GPU) acceleration technology to improve the rendering efficiency. A unction is used to represent the algorithm that draws certain simple or complex linear map symbols. This function reflects the structure of a linear map symbol (describing the symbol construction information) and also the rendering process of the symbolized linear map elements (handled on a per-pixel basis by the shader program). Based on the Open Geospatial Consortium (OGC), Styled Layer Descriptor (SLD) specifications, four basic line types (i.e., solid lines, dashed lines, gradient color lines, and transition lines) are implemented in the proposed method, and the implementation of line markers, line joins and line caps is also discussed. Three experiments are conducted to demonstrate improvements in map rendering. The results show that a variety of linear map symbols can be constructed in a uniform way, which suggests that the proposed method addresses the difficulty in drawing linear map symbols. With this method, the efficiency of rendering linear map elements is substantially improved compared to using the graphics device interface plus (GDI+) and anti-grain geometry (AGG) methods; it also provides an applicable approach for developing map rendering systems. Using this function-based concept, the complexity of building linear map symbols and drawing linear map elements can be decreased.

DOI

[11]
Wu M G, Zheng P B, Lu G N, et al.Chain-based polyline tessellation algorithm for cartographic rendering[J]. Cartography & Geographic Information Science, 2016,44(6):491-506.Abstract Although the extrusion of 1D polylines into a 2D polygon and the tessellation of the polygon into primitives has been performed in the field of computer graphics, the efficient, robust, and high-quality tessellation of thick polylines that supports various cartographic styles for polyline rendering remains a practical challenge. We examined and compared existing vertex-, segment-, and polygon-based algorithms, and present a chain-based tessellation algorithm for cartographic rendering: points in the polyline are classified into abrupt and smooth points according to their point spacing, angle and thickness. The polylines are then divided into abrupt and smooth chains by clustering points that are adjacent and of the same type. An optimal algorithm is also presented to continuously tessellate the smooth chains into minimum geometric primitives and efficiently tessellate the abrupt chains into geometric primitives. We implemented the proposed algorithm and present the results of robustness, efficiency, quality, and cartographic styling tests conducted on real-world polylines. The results indicate that this approach has substantial advantages when considering all four requirements (robustness, efficiency, quality, and the support for various cartographic styles).

DOI

[12]
窦世卿,赵学胜,刘成军,等.河网线要素与DEM综合的三维Douglas-Peucker算法[J].测绘学报,2016,45(4):450-457.目前三维Douglas-Peucker(3D_DP)算法主要应用于单一类型的DEM综合。本文引入"弯曲调节指数"来改进3D_DP算法,提出了一种三维空间河网要素与DEM综合的新方法,即将河网线矢量提取成三维离散点数据集(增加高程属性),与DEM三维离散点数据集合并,在河网层次化选取基础上,利用改进的3D_DP算法对合并数据集进行综合操作。通过试验结果的对比和分析表明,该方法通过弯曲调节指数的调节使河流自身所具有的弯曲形态与地形的主要特征得以同时保留,试验效果良好,实现了三维空间河网要素与DEM数据在同一简化因子作用下的综合,提升了地图综合的质量。

DOI

[ Dou S Q, Zhao X S, Liu C J, et al.The three dimensional Douglas-Peucker algorithm for generalization between river network line element and DEM[J]. Acta Geodaetica et Cartographica Sinica, 2016,45(4):450-457. ]

[13]
Li G S, Bordoloi U D, Shen H W.Chameleon: An interactive texture-based rendering framework for visualizing three-dimensional vector fields[C]// Proceedings of IEEE Visualization. IEEE, 2003:241-248.

[14]
Taibo J, Jaspe A, Seoane A, et al.Practical line rasterization for multi-resolution textures[C]. Smart TOOLS and Apps for Graphics. Eurographics Association, 2014:9-18.

[15]
Wartell Z, Kang E, Wasilewski T, et al.Rendering vector data over global, multi-resolution 3D terrain[C]. Proceedings of the Symposium on Data Visualization. Eurographics Association, 2003:213-222.

[16]
Agrawal A, Radhakrishna M, Joshi R C.Geometry-based mapping and rendering of vector data over LOD phototextured 3D terrain models[C]. Proceedings of the 14th International Conference in Central Europe on Computer Graphics. WSCG, 2006:1-8.

[17]
Schneider M, Klein R.Efficient and accurate rendering of vector data on virtual landscapes[J]. Journal of WSCG, 2007,15(15):1-3.In geographical information systems (GIS) vector data has important applications in the analysis and managementof virtual landscapes. Therefore, methods that allow combined visualization of terrain and geo-spatial vector dataare required. Such methods have to adapt the vector data to the terrain surface and to ensure a precise and efficientmapping. In this paper, we present a method that is based on the stencil shadow volume algorithm and allowshigh-quality real-time overlay of vector data on virtual landscapes. Since the method is a screen-space algorithmit is per-pixel exact and does not suffer from aliasing artifacts like texture-based techniques. In addition, since themethod is independent of the underlying terrain geometry, its performance does not depend on the complexity ofthe data set but only on the complexity of the vector data.

[18]
刘昭华,杨靖宇,戴晨光.基于模板阴影体算法的矢量数据在三维场景中的绘制[J].测绘工程,2009,18(1):38-41.提出一种基于模板阴影体算法的矢量数据绘制方法,实现矢量数据在三维场景中的高质量实时叠加显示。由于该方法基于屏幕空间,所以具有像素级的精度,不会出现传统的基于纹理方法所产生的绘制走样现象;而且不受地形几何数据的约束,其执行效率与地形数据的复杂度无关,仅取决于矢量数据本身的复杂度。详细论述基于模板阴影体算法矢量数据绘制的关键技术,并通过试验验证该方法的有效性。

DOI

[ Liu S H, Yang J Y, Dai C G.Rendering vector data over 3D terrain based on stencil shadow volume algorithm[J]. Engineering of Surveying and Mapping, 2009,18(1):38-41. ]

[19]
曹雪峰,万刚,李锋,等.模板阴影体扩展方法[J].中国图象图形学报,2013,18(4):81-86.

[ Cao X F, Wan G, Li F, et al.Extension method of stencil shadow volume[J]. Journal of Image and Graphics, 2013,18(4):81-86. ]

[20]
She J F, Zhou Y, Tan X, et al.A parallelized screen-based method for rendering polylines and polygons on terrain surfaces[J]. Computers & Geosciences, 2017,99(2):19-27.61New screen-space based method to render 2D polylines and polygons on terrain.61Undesirable rendering artifacts are eliminated.61Parallelized for rendering performance.

DOI

[21]
Yang L, Zhang L Q, Kang Z Z, et al.An efficient rendering method for large vector data on large terrain models[J]. Science China (Information Sciences), 2010,53(6):1122-1129.This paper presents an efficient way to render large-scale vector maps on level-of-detail (LOD) digital elevation models (DEMs). By using the frame buffer and Voronoi diagram, we achieve a rapid simplification of large-scale vector maps while keeping their original topological relationships. With the simplified maps, we establish level-of-detail vector map models. In the detailed level, we use the stencil shadow volume approach to render the map accurately, and in the coarse level we use substitute techniques to render the map approximately yet more quickly. The method proposed in this paper is universally applicable to rendering vector maps on various LOD terrain models, and the overlaying performance is independent of the complexity of underlying terrain surfaces. By use of the view frustum culling and sub-region index techniques, the impact of complexity of vector maps is reduced, and the rendering time is restricted to a certain scope. Thereby, we can achieve seamless and rapid rendering of large-scale vector maps on LOD terrain surfaces.

DOI

[22]
Yang L, Zhang L Q, Ma J T, et al.Efficient simplification of large vector maps rendered onto 3D landscapes[J]. IEEE Computer Graphics & Applications, 2011,31(2):14-23.Real-time rendering of large scale vector maps over terrain surfaces requires displaying substantial numbers of polylines and polygons. The proposed approach simplifies such maps, permitting more efficient rendering and reducing latency in the display and manipulation of a virtual environment.

DOI

[23]
Vaaraniemi M, Treib M, Westermann R.High-quality cartographic roads on high-resolution DEMs[J]. Journal of Wscg, 2013,19:41-48.The efficient and high quality rendering of complex road networks—given as vector data—and high-resolution digital elevationmodels (DEMs) poses a significant problem in 3D geographic information systems. As in paper maps, a cartographic representationof roads with rounded caps and accentuated clearly distinguishable colors is desirable. On the other hand, advancesin the technology of remote sensing have led to an explosion of the size and resolution of DEMs, making the integration ofcartographic roads very challenging. In this work we investigate techniques for integrating such roads into a terrain renderercapable of handling high-resolution data sets. We evaluate the suitability of existing methods for draping vector data ontoDEMs, and we adapt two methods for the rendering of cartographic roads by adding analytically computed rounded caps at theends of road segments. We compare both approaches with respect to performance and quality, and we outline application areasin which either approach is preferable.

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

DOI

[ Tan X, She J F.A new method of rendering 2D vector line symbols on 3D terrain surface[J]. Journal of Geo-information Science, 2015,17(12):1483-1489. ]

Outlines

/