Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Study Spatial data and Attribute data and Sequential data in MIS CHEN Yu The faculty of Management and Economics, Kunming University of Science and Technology , Kunming,China 650093 , Abstract The paper introduces how to create the table structure of spatial data and that of attributive data and that of sequential data in development of database system of management and accomplish the function of editing, querying the spatial data and attributive data and improve system capability of managing multi data type by using GIS software. Key words spatial data; Attributive data; Sequential Data 1 Preface We need geographical maps to enrich the query function in some management database system,, such as water conservancy, traffic, tourism .The map is requested as information querying carrier and do not request to do the normal geographical survey function. The software developer may use the GIS production to achieve goal of management system development. The GIS embedded production could apply to database system, such as MapX of Mapinfo Co., Map Object of Arcinfo Co., and Supermap2000 of Supermap Co. Among them Supermap is produced by Beijing Supermap Ltd.Co.. Supermap is embedded production and developed control of GIS. Supermap may display geographical data information and save those data in relational database. Supermap may be embedded into the rapid development tool, such as VB and Delphi etc. And connected to the relational database management system, such as Oracle, Sqlserver and Access and all of data store in database with relational structure. 2 Data Type in GIS Application In data storage system of GIS software, we will involve three data types and those data types are respective spatial data, attributive data and sequential data. The software developer must think over enough the characteristic of those data in system design. Spatial data is the single or group geographical object data refer to the space position. The spatial data expresses dot, line, polygon and text in GIS software. The spatial data storage in database with geographical object longitude and latitude and those data can’t be maintained directly in database by SQL. The spatial data is used to querying and surveying. The manipulation of spatial data is implemented by the special vector and cartography software system. Because it must spend some time to transfer graphical data to spatial data and it is the big difficulties that we face. therefore, we will shorten the building period of information system if we shorten the process of transferring graphical data to spatial data. Attributive data describe the current state of the geographical object except geographical position information and could be maintained directly by SQL in database. The attributive data storage in database with relation and the relation has primary key. Each geographical object has only one record of attributive data in database .For example, the river’s attributive data include name, length, flux etc and name is primary key. The attributive data may be maintained by vector software or database software, especially the database software. Sequential data is related to time and recorded the geographical object development. Therefore the primary key for the relation of sequential data are the time and the geographical object .The sequential data structure is created and maintained by SQL. For example, because of the river dike managing, we will maintain the dike by finance every year. The dike and the amount of money and relative date are made up of attributives of the relational structure of sequential data. 752 3 Step of the Application The following chapter of paper introduces how to maintain spatial data, attributive data and sequential data in information system using VB as the development tool, Sqlserver or Oracle as database platform and Supermap as geographical graph software platform. The information system integrates Supermap with VB is mainly the Supermap as the software control to embed in application and to config the corresponding data environment. As following paper illustrate the details of application step. 3.1 Loading Supermap Control All of the Supermap controls are loaded in development tool by the executable program of register supermap that is provided by Supermap ltd.co. We assume Supermap apply in VB as instance. The first step is to load Supermap controls into toolbox of VB .The second step is to use shortcut key (Ctrl+T) or click the right of mouse button and to click the components button, and the control listbox will appear .If you need any control, you click the check box. The choiced control will appear on the tool palette and now you can use those Supermap controls. 3.2 Building Datasource and Dataset The spatial data, attributive data and sequential data of Supermap store in database .The datasource of Supermap is mainly used to config DBMS, username, password etc and it can be connect with Sqlserver, Oracle and Access and it is similar to the concept of database in DBMS. Each datasource corresponds to only one database. The dataset of Supermap is used to store spatial data and each dataset only save one data type, such as line type or dot type or polygon type or text type .If you save the different data type in one dataset, system error information will appear. The dataset is similar to the concept of table in DBMS. Each datasource includes many dataset in Supermap. In addition, the spatial data field begins with SM and store latitude and longitude data and it don’t be updated by SQL in database. The other data in dataset can be updated by SQL92 criterion. Fig. 1 shows part of program code and illustrates syntax of the datasource and the dataset. … 1) Set DS = objSuperWorkSpace.Datasources(cmbDatasource.Text) obtaining datasouce 2) Set dt = DS.CreateDatasetFrom(Trim(txtDatasetName.Text), dseT) building new dataset 3) Select Case cmbFileType.Text Case "v_graph": spatial data must have corresponding database and table in supermap Set dt = DS.CreateDataset(strDatasetName, scdPoint, iOption) Case "v_datatable: Attributive data and sequential data maybe created by supermap or database Set dt = DS.CreateDataset(strDatasetName, scdTabular, iOption) … Figure 1: creating datasource and dataset ‘ ‘ ‘ ‘ 3.3 Database connectio If database connect success, you can query the spatial data, attributive data and sequential data correctly. Fig.2 shows code of database connection and emphasizes the method of database connection. … ‘Obtaining the type of datasource,Sqlserver or Oracle.Supermap could connect to Sqlserver or Oracle by ADO.In addition,Supermap could connect to Access by SDE. 1) If Me.cmbProvider.Text = "SQLOLEDB" Then Connecting Sqlserver 2) strDSName = "Provider=" & cmbProvider.Text & ";SERVER=" & txtServer.Text & _ "; DATABASE =" & txtDatabase.Text 3) ElseIf Me.cmbProvider.Text = "MSDAORA" Then Connecting Oracle ‘ ‘ 753 strDSName = "Provider=" & cmbProvider.Text & ";SERVER=" txtServer.Text End If 4) mStrDSName = strAlias 5) Set objDS = objSuperWorkSpace.CreateDataSource(strDSName, _ strAlias, sceADO, False, False, bEncrypt, strPassword) opening the datasouce with Sqlserver or Oracle 6) If chkSDEZD.Value = vbChecked Then Set ds = objSuperWorkSpace.OpenDataSource(strDSName, strAlias, sceSDE, True) Else Set ds = objSuperWorkSpace.OpenDataSourceEx(strDSName, strAlias, sceSDE, True, False, True, strPassword) End If Figure 2: connecting database (oracle/sqlserver) and opening database ‘ False, 3.4 Loading and manipulating geographical graph data The map is composed of many graphical layers in GIS and the graph layer corresponds to the dataset in Supermap. If the map needs to be appeared in the map window, the spatial data must be only loaded by the fashion of layer. In general, the entire graphical layer is used to use circular sentence for load. In addition, the Supermap provide many manipulative function for map, such as zoom in, zoom out etc.Fig.3 shows the layer loading and map manipulation. ‘showing all of graphical layer using circular sentence 1) For i = 1 To MapForm.Map1.Layers.Count Set ly = MapForm.Map1.Layers.Item(i) … Next i … 2) MapForm.MapTool = tlZoomIn 3) MapForm.MapTool = tlZoomOut … Figure 3: loading graph layer (dataset) and manipulating geographical map 3.5 Querying attributive data and sequential data The spatial data don’t query directly in database because the result of query are unuseful for us. The spatial data must transfer to map using Supermap and it is useful for us. The attributive data and the sequential data may be manipulated directly by SQL .If the attributive data structure and the sequential data structure accord with the demand of database normal forms in table design and ensure the joint field reasonable, the attributive data and the sequential data can be integrated into the information system. Fig.4 illustrates the connection and manipulation between the sequential data and the attributive data. … 1) Set objRecordSet = SuperMap1.Selection.ToRecordset(False) obtaining attribure data … 2) select riverid,rivername,riverlength into :v_riverid,:v_rivername,:v_riverlength from river where rivername like “%sm_rivername” ‘querying correlative sqequence data using Attributive data as queried condition … Figure 4: querying and maintaining sequential data and attributive data ‘ 3 .5 Application Instance Author had adopted Supermap to develop the water source management information system .We manipulated the spatial data, the attributive data and the sequential data in database. For example, reservoir and river may be marked on the map; therefore reservoir and river have the attributive data and the spatial data. The attributive data of reservoir include cubage and quantity etc. The spatial data of 754 reservoir include it altitude and longitude .Not only the attributive data but also the spatial data has only one record for geographical object in database. But such as flood prevention subsystem, the sequential data of reservoir must record the information of everyday water line; therefore the sequential data have many records in database. If you define reasonable primary key in different table, you can manipulate all of data as integration. The reservoir name is the primary key for the spatial and attributive data structure, and the time and the reservoir name are the primary key for the sequential data structure, therefore we may join the reservoir three data types with reservoir name. Fig.5 shows the application interface of spatial data, attributive data and sequential data. Figure 5: application instance 4 Summary In some management information system, we adopt graphical interface to increase the application readability and comprehensibility. Meanwhile, we must know the difference between graphical data and text data, otherwise, we don’t query and manipulate those data. Therefore, the data compatibility is the key technical problem in management information system. References [1]BeiJing Supermap ltd.co, 2000, supermap development tutorial, Beijing supermap ltd.co . [2]YAN Hui-wu,WU Xiao-fang,ZHU Guo-rui,December,2001, The Development of GIS Application Software on the Basis of MapX Control in VC++, Journal of Kunming University of Science and Technology,VOL.26,No.6,Page 12-17. [3] BeiJing Supermap ltd.co, 2000, comprehend supermap, Beijing supermap ltd.co. [4]WANG Shan,CHEN Hong, 1998,Database System Theory Tutorial, Beijing:Tsinhua University Press. : , : brief introduction of author CHEN Yu (1971-),male, associate professor ,research field Database, management information system .email: [email protected]; [email protected] 755