




版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、2012年8月第10卷第4期地理空間信息GEOSPATIALINFORMATIONAug.,2012Vol.10,No.4 插件式GIS 應(yīng)用框架的實(shí)現(xiàn)與應(yīng)用聞平,王媛,王沖(中國(guó)水電顧問(wèn)集團(tuán)昆明勘測(cè)設(shè)計(jì)研究院,云南昆明650051摘要:插件式GIS 應(yīng)用框架是一種可擴(kuò)展、可復(fù)用的GIS 體系架構(gòu),可顯著降低GIS 軟件開(kāi)發(fā)和維護(hù)的成本,增強(qiáng)GIS軟件應(yīng)用的靈活性,還能有效解決GIS 應(yīng)用需求多變的問(wèn)題。通過(guò)對(duì)插件式框架的結(jié)構(gòu)、插件技術(shù)等方面的研究,并結(jié)合實(shí)例,實(shí)現(xiàn)了一個(gè)基于.NET 平臺(tái)插件式GIS 應(yīng)用框架。關(guān)鍵詞:插件式;GIS 應(yīng)用框架;實(shí)現(xiàn);應(yīng)用中圖分類號(hào):P208文獻(xiàn)標(biāo)志碼:B文章
2、編號(hào):1672-4623(201204-0118-02 收稿日期:2011-07-14GIS 軟件經(jīng)過(guò)幾十年的發(fā)展,已經(jīng)從最初的空間數(shù)據(jù)存儲(chǔ)和顯示的簡(jiǎn)單應(yīng)用轉(zhuǎn)換為高級(jí)地理統(tǒng)計(jì)、空間分析和地理服務(wù)等方面的應(yīng)用,并且GIS 的應(yīng)用領(lǐng)域也越來(lái)越廣泛,GIS 應(yīng)用的方向和工程的復(fù)雜度也不斷增大。針對(duì)我院多部門(mén)之間共同開(kāi)展的GIS 技術(shù)應(yīng)用與研究,不同的部門(mén)有不同的需求,業(yè)務(wù)需求變化多端,如果繼續(xù)按照以往的軟件開(kāi)發(fā)程序來(lái)實(shí)施,每個(gè)項(xiàng)目從頭做起,不同項(xiàng)目的復(fù)用部分也僅僅是停留在代碼的簡(jiǎn)單復(fù)制與粘貼上面,這樣的技術(shù)與方法伸縮性較差,不能滿足軟件的擴(kuò)展與可復(fù)用的需求,不能充分發(fā)揮多部門(mén)、多人之間的協(xié)作關(guān)系。為
3、改變上述情況以適應(yīng)不斷衍生的業(yè)務(wù)需求,GIS 軟件需要擁有結(jié)構(gòu)清晰簡(jiǎn)潔、支持復(fù)用、可擴(kuò)展性強(qiáng)和易于維護(hù)等高性能的架構(gòu)。插件式GIS 應(yīng)用框架是解決上述問(wèn)題的比較好的技術(shù)途徑,本文基于.NET 平臺(tái)設(shè)計(jì)了面向應(yīng)用型的插件式GIS 應(yīng)用框架,并對(duì)其實(shí)現(xiàn)原理進(jìn)行了深入研究,將研究成果應(yīng)用于實(shí)際,取得了較好的效果。1插件技術(shù)1.1基本概念插件是按照預(yù)定接口實(shí)現(xiàn)的軟件功能構(gòu)件。應(yīng)用程序可在“運(yùn)行時(shí)”動(dòng)態(tài)加載插件并執(zhí)行其功能。插件技術(shù)是一種提高軟件復(fù)用性和可擴(kuò)展性的有效方法。插件技術(shù)使應(yīng)用軟件具有很好伸縮性,在軟件領(lǐng)域已有較廣泛的應(yīng)用。1.2插件的實(shí)現(xiàn)技術(shù)插件的實(shí)現(xiàn)一般有3種技術(shù):基于動(dòng)態(tài)鏈接庫(kù)DLL 的
4、插件、基于組件對(duì)象模型COM 的插件和基于.NET 反射技術(shù)的插件。動(dòng)態(tài)鏈接庫(kù)是具有某種功能的一種軟件模塊,動(dòng)態(tài)鏈接庫(kù)文件本身并不能獨(dú)立運(yùn)行,但它能夠被其他程序調(diào)用實(shí)現(xiàn),基于這種特性,使用動(dòng)態(tài)鏈接庫(kù)也能產(chǎn)生插件對(duì)象。組件對(duì)象模型COM 是一種組件二進(jìn)制級(jí)別的交互標(biāo)準(zhǔn),它以COM 接口作為不同組件之間通信的通道,只要實(shí)現(xiàn)了COM 標(biāo)準(zhǔn),使用任何一種支持COM 語(yǔ)言編寫(xiě)的組件都能夠互相調(diào)用。在.NET Framework 中,使用.NET 的反射機(jī)制和接口技術(shù),也能夠產(chǎn)生插件。.NET 平臺(tái)動(dòng)態(tài)加載一個(gè)插件程序集后,可以通過(guò)反射機(jī)制,獲得程序集中的類型信息,如果類型信息滿足主程序的要求,主程序?qū)⑹?/p>
5、用對(duì)象動(dòng)態(tài)生成技術(shù)在內(nèi)存中根據(jù)類型定義產(chǎn)生一個(gè)插件對(duì)象實(shí)例并加載到插件池中。本文后面所提到的插件的開(kāi)發(fā)就是基于.NET 反射技術(shù)實(shí)現(xiàn)的。2插件式GIS 應(yīng)用框架結(jié)構(gòu)本文所述的插件式GIS 應(yīng)用框架主要包括4個(gè)組成部分,如圖1所示。圖1插件式GIS 應(yīng)用框架結(jié)構(gòu)圖1主界面程序:該程序是以EXE 可執(zhí)行文件的形式存在,主要負(fù)責(zé)生成按鈕、工具、工具條和菜單等界面UI 對(duì)象,并負(fù)責(zé)將這些對(duì)象事件進(jìn)行委托關(guān)聯(lián)。2插件引擎:提取插件程序集中包含的插件類型信息并負(fù)責(zé)將其生成相應(yīng)的插件對(duì)象。3通信契約:主程序與插件之間相互認(rèn)可的一種標(biāo)準(zhǔn),以接口的形式存在,即只有實(shí)現(xiàn)了規(guī)定接口的類型對(duì)象才能被插件引擎認(rèn)可為插件
6、。第10卷第4期1194插件:插件式框架具體功能的實(shí)現(xiàn),插件式框架模型將一個(gè)程序的功能劃分為相對(duì)獨(dú)立的模塊,每一個(gè)模塊就以一個(gè)單獨(dú)的插件形式存在。3插件式GIS 應(yīng)用框架的設(shè)計(jì)3.1實(shí)現(xiàn)的接口本文所述的插件式GIS 應(yīng)用框架主要實(shí)現(xiàn)了以下7個(gè)接口:IApplication 接口、IPlugin 接口、ICommand 接口、ITool 接口、IToolbarDef 接口、IMenuDef 接口和IDockableWindowDef 接口,其接口關(guān)系如圖2所示。 圖2接口關(guān)系圖3.2插件的動(dòng)態(tài)加載本系統(tǒng)將插件統(tǒng)一放在一個(gè)文件夾(plugin 中,在主程序啟動(dòng)時(shí)去查找該文件夾并創(chuàng)建可用的插件對(duì)象。
7、當(dāng)用戶需要增加新的功能時(shí),只需要將符合接口的新程序集放在plugin 文件夾中,重新啟動(dòng)主程序即可完成功能的添加。同理,當(dāng)用戶需要?jiǎng)h減一個(gè)功能時(shí),只需要將實(shí)現(xiàn)該功能的程序集移除plugin 文件夾,重新啟動(dòng)主程序即可完成功能的刪減。本框架中插件的動(dòng)態(tài)加載使用了.NET 的反射機(jī)制,它能根據(jù)一個(gè)插件類型的描述信息產(chǎn)生插件對(duì)象。插件的動(dòng)態(tài)加載過(guò)程如下:1使用一個(gè)靜態(tài)方法探測(cè)啟動(dòng)路徑下的plugin 文件夾是否存在,如果不存在,將自動(dòng)新建一個(gè)plugin 文件夾避免出現(xiàn)異常:if (!Directory.Exists (pluginFolder 不存在,系統(tǒng)自動(dòng)建立了一個(gè)!"如果插件文件夾
8、存在,將尋找該文件夾中所有的DLL 文件并返回一個(gè)包含了文件路徑的字符串?dāng)?shù)組。2系統(tǒng)遍歷文件路徑數(shù)組,從中得到每一個(gè)程序集文件的絕對(duì)路徑,然后將其動(dòng)態(tài)加載。3系統(tǒng)識(shí)別類型的每一個(gè)接口,如果該類型的某個(gè)接口完整名為ICommand 、ITool 、IToolbarDef 、IMenuDef 或IDockableWindowDef 中的一種,系統(tǒng)將認(rèn)定該類型是一個(gè)有效的插件類型并根據(jù)該類型名產(chǎn)生一個(gè)實(shí)例對(duì)象。3.3插件的調(diào)用針對(duì)不同的插件,插件管理器獲取插件后,主程序根據(jù)插件信息生成并調(diào)用相應(yīng)的插件,在主程序的系統(tǒng)界面上生成相應(yīng)的菜單和工具欄,比如ICommand 表現(xiàn)為命令按鈕,ITool 表現(xiàn)
9、為工具按鈕,IMenuDef 表現(xiàn)為菜單欄,IToolbarDef 表現(xiàn)為工具條,后兩者均為ICommand 命令按鈕和ITool 工具按鈕的停靠對(duì)象。4應(yīng)用實(shí)例本文以.NET 平臺(tái)為開(kāi)發(fā)環(huán)境,通過(guò)C#、AcrGIS Engine 9.3組件和Skyline Globe 組件完整地實(shí)現(xiàn)了一個(gè)插件式GIS 應(yīng)用框架,系統(tǒng)主界面如圖3所示。圖3系統(tǒng)主界面5結(jié)語(yǔ)本文從系統(tǒng)框架、接口實(shí)現(xiàn)和加載等方面討論了插件式GIS 應(yīng)用框架的實(shí)現(xiàn)過(guò)程,并結(jié)合實(shí)踐,搭建了一個(gè)完整的插件式GIS 應(yīng)用框架。只要定義好了接口規(guī)范,后期便可以利用插件對(duì)系統(tǒng)的功能進(jìn)行很好地?cái)U(kuò)展,減少重復(fù)工作,能在很大程度上提高工作效率,降低
10、開(kāi)發(fā)成本和后期維護(hù)成本。參考文獻(xiàn)1陳方明,陳奇.基于插件思想的可重用軟件設(shè)計(jì)與實(shí)現(xiàn)J .計(jì)算機(jī)工程與設(shè)計(jì),2005,26(1:172-1732蔣波濤.插件式GIS 應(yīng)用框架的設(shè)計(jì)與實(shí)現(xiàn)M .北京:電子工業(yè)出版社,20083高慧萍,呂俊.插件式開(kāi)發(fā)技術(shù)研究與實(shí)現(xiàn)J .計(jì)算機(jī)工程與設(shè)計(jì),2009,30(16:3805-38074張毅,李國(guó)卿,趙軍喜,等.插件式GIS 應(yīng)用框架關(guān)鍵技術(shù)研究J .測(cè)繪科學(xué)技術(shù)學(xué)報(bào),2010,27(4:298-3015江麗鈞,談曉珊,孫毅中.基于插件的城市規(guī)劃信息系統(tǒng)的研究J .現(xiàn)代測(cè)繪,2010,33(1:8-106盧學(xué)鶴,余光輝,溫小榮,等.基于插件技術(shù)的森林資源G
11、IS 的設(shè)計(jì)與實(shí)現(xiàn)J .南京林業(yè)大學(xué)學(xué)報(bào):自然科學(xué)版,2009,33(1:127-1307楊世琦,徐永近,高陽(yáng)華.基于插件技術(shù)的測(cè)土施肥決策系統(tǒng)設(shè)計(jì)J .西南師范大學(xué)學(xué)報(bào):自然科學(xué)版,2010,35(1:158-163第一作者簡(jiǎn)介:聞平,碩士,工程師,主要從事測(cè)繪新技術(shù)開(kāi)發(fā)及3S 技術(shù)應(yīng)用工作。聞平等:插件式GIS 應(yīng)用框架的實(shí)現(xiàn)與應(yīng)用地理空間信息GEOSPATIAL INFORMATIONgistics vehicle dispatch system can help dynamic scheduling of ve-hicles effectively,besides it could c
12、ommand and control the vehicle on the way of delivery and monitor its state in time.Key words GPS,GIS,GPRS,intelligent logistics,scheduling sys-tem(Page:92 Design on the Mine Monitoring and Control System Based on 3DGIS by LU Shidong Abstract This paper introduced the necessity to develop mine moni-
13、toring and control system based on3DGIS,and described the detail of system structure and how to build the mine3D model,designed the functions of the system software.Key words3D,GIS,mine monitoring and control,system(Page:95 Realization of the Web Application of Thematic Data3D Terrain Visualization
14、by MENG Lei Abstract With the development of GIS and Web technology,the Web applications of various thematic3D visualizations are initiated nat-urally.Combining thematic data3D terrain visualization technology with NewMap,the huge thematic3D data can rapidly browse in Web explorer.Key words thematic
15、 data,3D terrain visualization,Web,NewMap(Page:98 Application of Modern Remote Sensing Techniques in Land Law Enforcement Work by SUN Jiefang Abstract This paper described the application of modern Remote Sensing techniques in land and resources law enforcement work,car-ried out a detailed descripti
16、on and analysis of the use of process tech-nology roadmap.Keywords Remote Sensing technology,law enforcement and super-vision,land and resources,RapidEye(Page:100 Design and Development of Tianjin Urban Service Hotline GIS System by LIU Yang Abstract Urban public facilities management service is the
17、 focus of government departments and public and it related to everyone's life. Urban service hotline system unifies different urban management ser-vices into a hotline voice platform,builds Tianjin service hotline of covering the whole city construction management.This article de-scribed Tianjin
18、 urban service hotline GIS system data structure,di-scussed the system function design in detail,and analyzed the techni-cal features of the system.Key words C/S architecture,ArcEngine,COM,ComGIS(Page:102 Rapid Building up and Application of Software Templates Based on COM-GIS by ZHUO Yun Abstract F
19、or GIS platform,this paper discussed the compiling and in-tegration of common basic function of a user's custom template in the Microsoft Visual Studio platform.Making it easy for integrating of C/S and B/S system's architectures,according to the needs of the project, it quickly extracted th
20、e corresponding function of the underlying functi-onality,and completed integration of basic function.The key is open-ness and compatibility of the basis of the common basic function, which has a significant impact on quickly building the project and the processing of project core function.Key words
21、 GIS re-development,software templates,rapid building platform(Page:105 Development and Application of Digital Orthophoto Topographic Map by TAN Yaohua Abstract There is variety of composite products in the basic geogra-phic information of digital products.Digital orthophoto topographic map is widel
22、y used as a product model.It is developed by the digital ortho-photo map and other relevant data,or integrated with the thematic in-formation data.Combined with the working practice,the digital ortho-photo topographic map and its application prospects were analyzed and discussed in this paper.Key wo
23、rds digital orthophoto topographic map,DOM,DLG,data ac-quisition(Page:107Methods and Skills of Quickly Entering Database for Digital Top-ographic Map in ArcGIS by GOU Haoyuan Abstract Combining with entering database for digital topographic map of torch development zones in Zhongshan City,because of
24、 the ef-fective methods and skills in the data transformation,editing and qual-ity inspection,this paper realized the quickly entering databases for digital topographic map in ArcGIS on the premise of ensuring quality. Key words digital topographic map,ArcGIS,data loading,data trans-formation,method
25、s and skills(Page:110Research on the Distribution and Target for Frame Digital Aerial Photo Control Points by ZHANG Huijun Abstract This paper emphasized on the presentation of the setting and selecting photo-control points in the photo-control point measure-ment.We draw some conclusions that the ai
26、r route network accuracy estimation formula is applicable,and the number of photo control point of the digital aerial camera should be more than the optical aerial cam-era's.In addition,in some certain conditions,it is feasible to set control points crossing the air routes,and the mapping precis
27、ion should be considered when selecting control points,but not according to the exis-ting specifications.Key words frame digital aerial camera,photo-control point,setting point,selecting point(Page:112Application of GIS in Science and Technology Serviceby LU Nana Abstract Science and technology info
28、rmation service in promoting social development plays an important role.This paper brought in GIS technology and discussed the function of it in science and technology services.Based on the detailed analysis of the disadvantages of tradi-tional science and technology services,this paper designed the
29、 ser-vice framework and its function,provided a new method for inquiry,dis-play,conversion and decision support of science and technology ser-vices.Key words GIS,science and technology service,decision support(Page:115 Implementation and Application of GIS Application Framework Based on Plug-in Technology by WEN Ping Abstract GIS application framework based on plug-in technology is a kind of extendable and reusable software architecture for GIS.It can not only reduce the cost of GIS development and maintenance,but also enhance the flexibility of GIS software.It can also solve the prob-
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 【正版授權(quán)】 ISO/IEC 15415:2024 EN Automatic identification and data capture techniques - Bar code symbol print quality test specification - Two-dimensional symbols
- 2025年度化工生產(chǎn)工廠技術(shù)許可合同協(xié)議
- 2025年城市管道天然氣項(xiàng)目建議書(shū)
- 設(shè)備管理科設(shè)備維護(hù)與更新計(jì)劃
- 提升倉(cāng)庫(kù)服務(wù)質(zhì)量的個(gè)人策略計(jì)劃
- 社區(qū)個(gè)人工作計(jì)劃改善社區(qū)供水設(shè)施
- 2025年特種大型鋁合金型材合作協(xié)議書(shū)
- 新聞媒體安全管理的必要性計(jì)劃
- 社團(tuán)交流合作的網(wǎng)絡(luò)平臺(tái)計(jì)劃
- 2025年中大型重載軸承項(xiàng)目建議書(shū)
- 2025年湖南環(huán)境生物職業(yè)技術(shù)學(xué)院高職單招職業(yè)適應(yīng)性測(cè)試近5年常考版參考題庫(kù)含答案解析
- 2025年道路運(yùn)輸企業(yè)安全生產(chǎn)管理人員考試題(附答案)
- 建設(shè)工程質(zhì)量安全監(jiān)督人員考試題庫(kù)含答案
- 居間合同標(biāo)準(zhǔn)范本
- 電氣控制技術(shù)項(xiàng)目化教程 第2版 課件 項(xiàng)目1、2 低壓電器的選用與維修、電動(dòng)機(jī)直接控制電路
- 2025年上半年山東人才發(fā)展集團(tuán)限公司社會(huì)招聘易考易錯(cuò)模擬試題(共500題)試卷后附參考答案
- 2025年上海民航職業(yè)技術(shù)學(xué)院高職單招職業(yè)適應(yīng)性測(cè)試近5年常考版參考題庫(kù)含答案解析
- 2024年山東理工職業(yè)學(xué)院高職單招語(yǔ)文歷年參考題庫(kù)含答案解析
- 《生命與宗教》課件
- 《中華人民共和國(guó)學(xué)前教育法》專題培訓(xùn)
- 軟件公司K3渠道招募制度
評(píng)論
0/150
提交評(píng)論