计算机工程与应用
計算機工程與應用
계산궤공정여응용
COMPUTER ENGINEERING AND APPLICATIONS
2009年
32期
189-192
,共4页
Douglas-Peucker算法%矢量数据压缩%可缩放矢量图形(SVG)%公共边对象化Douglas-Peucker改进算法
Douglas-Peucker算法%矢量數據壓縮%可縮放矢量圖形(SVG)%公共邊對象化Douglas-Peucker改進算法
Douglas-Peucker산법%시량수거압축%가축방시량도형(SVG)%공공변대상화Douglas-Peucker개진산법
Douglas-Peucker algorithm%vector data compressing%Scalable Vector Graphies(SVG)%common boundary objected Douglas-Peucker improving algorithm
分析了常规Douglas-Peucker算法压缩无拓扑矢量数据时产生公共边"裂缝"现象的原因,即公共边被两次或可能更多次压缩,而每次运用Douglas-Peucker算法压缩时所选择的初始点和终点不同造成的.为此,提出了公共边对象化Douglas-Peucker改进算法.为实现此算法,首先设计了新的公共边提取算法来提取公共边,然后使用OOP技术,把公共边的相关信息封装成类,最后根据公共边对象提供的信息对多边形的公共边和非公共边分别进行Douglas-Peucker压缩.以广东省行政界线的SVG矢量图为实验对象验证了该算法的有效性,分析了该算法相对于其他Douglas-Peucker改进算法在所需辅助空间和时间效率上的优势.
分析瞭常規Douglas-Peucker算法壓縮無拓撲矢量數據時產生公共邊"裂縫"現象的原因,即公共邊被兩次或可能更多次壓縮,而每次運用Douglas-Peucker算法壓縮時所選擇的初始點和終點不同造成的.為此,提齣瞭公共邊對象化Douglas-Peucker改進算法.為實現此算法,首先設計瞭新的公共邊提取算法來提取公共邊,然後使用OOP技術,把公共邊的相關信息封裝成類,最後根據公共邊對象提供的信息對多邊形的公共邊和非公共邊分彆進行Douglas-Peucker壓縮.以廣東省行政界線的SVG矢量圖為實驗對象驗證瞭該算法的有效性,分析瞭該算法相對于其他Douglas-Peucker改進算法在所需輔助空間和時間效率上的優勢.
분석료상규Douglas-Peucker산법압축무탁복시량수거시산생공공변"렬봉"현상적원인,즉공공변피량차혹가능경다차압축,이매차운용Douglas-Peucker산법압축시소선택적초시점화종점불동조성적.위차,제출료공공변대상화Douglas-Peucker개진산법.위실현차산법,수선설계료신적공공변제취산법래제취공공변,연후사용OOP기술,파공공변적상관신식봉장성류,최후근거공공변대상제공적신식대다변형적공공변화비공공변분별진행Douglas-Peucker압축.이광동성행정계선적SVG시량도위실험대상험증료해산법적유효성,분석료해산법상대우기타Douglas-Peucker개진산법재소수보조공간화시간효솔상적우세.
The paper analyzes the reason of graphic distortion phenomenon when compressing the non-topology vector graphics by classical Douglas-Peucker algorithm.The reason is that the common boundary is compressed with Douglas-Peucker algorithm more than one time.Based on this,an improvement on Douglas-Peucker named common boundary objected Douglas-Peucker improving algorithm is put forward.To implement it,first this paper designs a new algorithm for extracting common boundary between two polygons.Then it adopts the idea of OOP,packages the common boundary to be a class with other information showed in figure two.Finally,on the basis of the class,it applies classical Douglas-Peucker to the common boundary and non-common boundary of polygons respectively to compress vector graphics.At last,the validity of the new compressing algorithm is proved by experiment with SVG graph.And the advantages in space and time efficiency are analyzed by contrast with the other DouglasPeucker improving algorithm showed in table one and two.