Her major research interests include cartography
COM electronic map system and GIS theory
Laboratory of GIS
Ministry of Education
Geographic Information System(GIS) is a new technology that begins since the middle of 60’s. By developing for several decades, GIS has been applied to all kinds of fields such as geology, national defense, public security, infrastructure, agriculture and land planning etc, which provides the major functions for the management, analysis, handling and visualization of the geographic data. Therefore, GIS has become one of the important technologies in geography (WU Fa-dong, 2001).
The way of traditional GIS software development is to construct the system step by step from the bottom. However, some problems are arising gradually over time. Firstly, the application becomes more and more complicated, which has difficulty in continuously developing and maintaining. At the same time, the tight inner structure of system can make some functions not be deleted, replaced, updated and reused easily. At last, the application lacks for the competence of cooperating with others, and can’t be integrated with other systems easily.
With respect to the shortages of traditional method, Component Object Model(COM) technology appears, which is the key to resolve the problem that software development falls behind hardware for a long time(TAN Ren-chun, 2003). In the mode of COM technology, one software system is composed of many objects that cooperate with each other, and each object provides the special functions as the standard and open interfaces in order to communicate with others (LIU Dan, 2002). It is a efficient way to apply COM technology into GIS software development, which gets rid of the repeated development work, promotes the progress of GIS technology, and will bring the great chance to GIS development (HUANG Jian-ye, 2002).
Electronic map, as one part of GIS, is a new map category that is derived from the combination of digital technology and traditional cartography. It is one modern information production which takes the visual digital map as the background and uses the multimedia such as text, sound, animation and video to show all kinds of information. (REN Fu, 2001).
At present, the successful electronic map software, Atlas 2000, which is developed here in Telecarto studio, can meet the need of users. However, when developing and maintaining Atlas 2000 continuously, we still faces the same problems of traditional GIS software development. Therefore, considering the reuse of knowledge and technology, cross-platform programming, and secondary development easily, a COM-based electronic map system, TeleMap is developed. TeleMap is an ActiveX which is based on the electronic map software, Atlas 2000 and integrates road navigation, map projection, cartographic symbolization by the means of COM technology.
Design of Electronic Map COM
Electronic map can be displayed on the electronic screen in real-time. As usual, an electronic map system includes many functions such as map visualization, edit, management, analysis, multimedia play and so on. Therefore, when designing a COM of electronic map, many factors need to be considered, for example the source of data, structure of data, management of database, visual style of map, way of playing multimedia etc. Besides, the query function of GIS is considered specially in order to meet the need of all kinds of users.
Architecture of Electronic Map COM
By analyzing and summarizing the functions of electronic map software, TeleMap is divided into nine components: TeleMapBase, TeleMapSave, GeometryObject2D, TeleMapDisplay, TeleMapSymbol, TeleMapProject, TransportNetwork, VehicleNavigation and TeleMapTransferData. Each component not only realizes its own functions, but also is related with the other components. TeleMap manages these components and is responsible for their mutual communications. They work together to implement the basic functions of electronic map. See Figure 1 for the architecture of TeleMap.
Figure 1 : Architecture of electronic map COM
Here TeleMapBase is the component of data organization and management, which organizes and manages the multi-scale vector and raster map and their attribute data, and implements the merging and precise positioning of maps, the overlapping of vector and raster maps, and the visualization of multi-scale maps. The general idea of multi-scale maps is to put the same scale data into one layer interface: TMGeoLayer, then set the attribute values of Minimum and Maximum Scale(MMS) in order to control the visual range of layer. During the zooming in or zooming out of the maps, the system can dynamically control how to visualize the different scale layers orderly according to their attribute values of MMS, so as to visualize multi-scale maps.
GeometryObject2D is the component of geometry elements, which manages all kinds of geometry element interfaces. Designing geometry element interfaces refers to the standard interface of OpenGIS, and geometry element interfaces provide the functions and algorithms of editing and analyzing the geometry data spatially.
TransportNetwork is the component of public bus line query, which gains the bus line data from the component of geometry elements firstly, then spatially queries and searches the best route of minimum transfer times and minimum distance.
VehicleNavigation is the component of road navigation. It refers to the road navigation data format GDF to construct one format which is made up of node, arc, route and many attributes such as pass, single direction, double direction and so on. It provides the function of querying the best route of minimum time and minimum distance in order to meet the different users’ need.
TeleMapDisplay is the component of map visualization, which visualize the vector and raster map data, draw the dynamic annotations, map symbols and so on. It can implement the projection visualization and symbolization of map by the component of map projection and symbolization. TeleMapSave is the component of database storage. Its function is to save the graphic data, attribute data and other descriptive data into database as the different formats such as Access, SQLServer or Oracle. When needing to use the saved data, we can open the database file by the interfaces of TeleMapSave, and obtain the information of database.
TeleMapTransferData is the component of transferring map data. Considering the variety of data, TeleMapTransferData provides one public transferring interface, which transfers the different data source to the customized data format in order to assure the security and utilizability of data.
TeleMapSymbol is the component of map symbolization, whose function is to symbolize topographic map and thematic map, and manage their symbol library.
TeleMapProject is the component of map projection, which implements the transform of most map projection, and can transform the geographic coordinate to the planar coordinate according to the different projection. It is called by TeleMapDisplay so as to visualize the map.
TeleMap, electronic map COM, is in charge of the other nine components and their communications of each other, which makes that the other nine components are not quoted by each other explicitly. Thus the other nine components can couple each other loosely to assure that they can not only be related with each other, but also take changes alone. At the same time, TeleMap can obtain all kinds of mouse and keyboard message, manage and implement the editing functions related with operation.
In TeleMap, different components are composed of different inner interfaces. Each component is taken as an independent module to some extent. At the same time, there are relations between those components. Now, take TeleMapBase and GeometryObject2D for instance, which illustrates their inner interfaces design and how to relate with each other.
TeleMapBase is the more complicated one in the nine components. It uses the structure Workspace-Map-Layer-Feature, to manage the data of electronic map. As in Figure 2, TMGeoWorkspace is the interface of workspace, which manages the collection of map: TMGeoMaps (TMGeoMaps is the collection of TMGeoMap); TMGeoMap is the interface of map, which manages the collection of layer:TMGeoLayers ( TMGeoLayers is the collection of TMGeoLayer), TMGeoLayer is the interface of Layer, which manages TMGeoFeatures (TMGeoFeatures is the collection of TMGeoFeature). TMGeoFeature represents one map feature, which manages the collection of field: TMFields(TMFields is the collection of TMField, and represents the collection of attribute data and geometry data). Each interface provides its own attribute interface, by which all kinds of attributes can be set and obtained.
GeometryObject2D is the component of geometry elements, which manages the interfaces of geometry elements. There are all kinds of geometry elements, such as point, poly-line, Bezier line, polygon, rectangle, arc and route etc. They implement the basic interfaces: IGeometry2D, ISpatialRelation2D, ISpatialOperator2D, IWks, IGeometryTransform2D.
IGeometry2D is the interface of geometry, which provides the methods and attributes that are common to all geometry elements, such as dimension of geometry element, type of geometry element, clone of geometry element and bound rectangle of geometry element etc.
ISpatialRelation2D represents the interface of spatial relation in geometry elements. It provides the methods of spatial relations, such as contains, crosses, disjoint, equals, intersects, overlaps, touches and within etc.
ISpatialOperator2D is the interface of spatial operation in geometry elements. It includes the methods of usual spatial operations, such as distance, buffer, difference, intersection, union, symmetric-difference.
IWks is the input and output interface of geometry elements. It provides two major functions, one is to make the data of geometry element output one data block by the means of binary or text, the other is to interpret one data
Figure2: component structure
Figure 3 Derived relation of interface
block to the data structure of geometry element. IGeometryTransform2D is the interface of matrix transform. It includes the usual matrix transforms such as: move, scale, rotation. And it refers also to the complicated matrix transform. Generally, geometry elements must implement the basic interfaces above, As in Figure 3, it is the interface derived relation from Polygon2D class.
Relation between TeleMapBase and GeometryObject2D
As in Figure 2, TMFields interface represents the collection of geometry and attribute of layer feature in TeleMapBase. TMFields is made up of many TMField. Of all, one TMField interface is related with the interface of geometry element in GeometryObject2D, and the interface of geometry element is stored in the attribute value of TMField, which makes two components relate each other tightly.
Developing electronic map system Based on TeleMap
The components look like a pile of various building blocks, which implement the different functions respectively. According to the different needs, the components are integrated together and communicate with each other by the standard interfaces to form one system. Using the components to construct the system is not limited in developing platform, which can be implemented in visual development environment such as VB?VC?Delphi.
Architecture of electronic map system
As in Figure 4, an electronic map system is set up on the basis of spatial database and multimedia database. The system provides the functions such as visualization of vector and raster map, information query, spatial analysis, multimedia representation of objects and others. Most functions can be implemented by calling the methods of TeleMap. The other functions, like playing the multimedia information, can be implemented by the controls of visualization platform.
Figure 4: Architecture of electronic map system
The authors have integrated the TeleMap control in VB to accomplish an electronic map system. The system has functions such as: map visualization, zooming in, zooming out, panning, information query, bus line query, spatial analysis, transfer of other data formats and so on.
Apply TeleMap to Develop Electronic Map System. Environment setting
The TeleMap control is put into ToolBox, then pulled into the form in VB. Thus the methods and attributes in TeleMap can be called to implement the functions above.
Visualization and edit of map
As we know, a map consists of many layers that overlap together. In TeleMap, the layers are divided into different types such as point layer, curve layer, polygon layer, stop point layer, arc layer, route layer, raster background layer, vector background layer, user-customized layer and so on. By calling the method NewTMGeoLayerLayer() in TeleMap, system can add a new layer. Because of the data structure of workspace-map-layer, the new layer will be added into the current active map in the workspace automatically.
After generating the new layer, gain the interface of layer, set its edit attribute, then select the current operations such as: adding point, adding line, adding polygon, editing node, moving object and so on. The users can call AddFeature() to add the object into the layer, or call the method OperateSelectedFeature() to make the editing operation on the selected objects.
Information query falls into two ways. One is to query its attribute according to the geometry element; the other is to query its geometry element according to the attribute of feature. The former is composed of some operations: firstly click the geometry object on the screen, then call the method FindFeaturesInGeometry() to get the selected objects, finally visualize the selected objects with highlight and play their multimedia information and attributes. The latter is to get the geometry object by the means of querying its ID in database, then visualize the object with highlight.
Bus line query
Use the method ImportTransportData() of TeleMap to import bus line data, and select the start and end stop, then call the method QueryRoute() to query the optimal route, which implements the algorithm of minimum transfer times and minimum distance between two stops. 3/3 GUI of Electronic Map System
Figure 5 shows the GUI of the electronic map system: take the map of certain region as the background, use the electronic map system based on TeleMap to visualize the map, then call the functions of bus line query to gain the optimal route.
Figure 5: GUI of electronic map system
COM technology is the experiential sum-up of software development over the long time, which resolves some problems of baffling the software development and improves the software developing efficiency. Developing the electronic map software by using COM technology is helpful to constructing the open software system, which unites other software more extensively and promotes the popularity and development of electronic map software.
- 1 WU Fa-dong, FU Zong-tang and WANG Xiao-niu. Principle of Geographic information systems [M]. BeiJing: Publishing House of Electronics Industry,2001.
- TAN Ren-chun, CAI Zhong-liang, WU Guo-feng and FANG Peng. The Application of Components technology in GIS. Surveying and Mapping of Sichuan. 2003 Vol.26 No.1:24~27
- LIU Dan, ZHENG Kun and PENG Li-hui. Research and Application of Components Technology in Geographic Information System. Earth Science-Journal of China University of Geosciences, 2002, Vol. 27 No.3:263~266
- HUANG Jian-ye and WANG Wei-an.Group-ware technology and its application in GIS. Surveying and Mapping of Geology and Mineral Resources. 2001, Vol. 17 No.3:39~42
- REN Fu, CAI Zhong-liang, WU Guo-feng and Shi Xiao-yan. Solution of multimedia electronic atlas based on ATLAS2000, Map,2001,Vol,17:5~9.