Research on Data Sharing between Autocad and Mapgis in Cadastral Database Construction

In the Second Chinese Country Survey, MAPGIS (Map Geographic Information System) is widely used all over the country in the Cadastral Database Construction. There are plenty original data is saved in the Au-toCAD (Auto Computer Aided Design) data format. Therefore it is important to find a way which can exchange and share the data between AutoCAD and MAPGIS effectively and efficiently. In order to use Map-GIS cadastral management system building cadastral database, it researched the current transformation methods between data of MapGIS and AutoCAD, including analysis defects of ObjectARX technology, southern CASS conversion interface, DXF file conversion. Combining the characteristics of MAPSUV data and southern CASS data, it found a data conversion method through the DWGdirectX control. This method actually read and wrote files provided by the library of MAPSUV and AutoCAD. This way avoids exchange process which can better transform the southern CASS DWG file containing graphics and attributes information to the SUV. The example which showed how DWG file transformed into SUV file. It improves the effectiveness and efficiency of conversion.


Introduction
Urban cadastral information system is an important subsystem for land and resources information system [1].
MAPSUV is an urban cadastral information system providing a series of functions to build cadastral database based on MapGIS.MapSUV has the same data format with MapGIS.Southern CASS is based on AutoCAD digital mapping system and consists with AutoCAD data formats.It is widely used in data collection [2].In order to use MAPSUV to build cadastral database, it need to transform DWG files to SUV files.We studied the popular ways of how data conversion between MAPSUV and South CASS, then analyzed how to use DWGdirectX to read DWG files, and finally gave an example of the conversion between MAPSUV and South CASS.

Relevant Research on Data Conversion
AutoCAD and MapGIS have spatial coordinates, which can link the target and reference system, describe the topological relation data, and handle the graphics attribute data.The major difference is that AutoCAD d a t a mainly process regular geometry and its combination.Its graphics functions, especially the 3d graphics functions are powerful, while its attribute database functions is relatively weak, which uses geometric coordinates.Map-GIS mainly process natural target with complex fractal characteristics, such as coastline, terrain contours, etc.These graphics are difficult to process.MapGIS attribute database contents structure is complex which has powerful functions.The conversion of graphics and attribute are very flexible and professional [3].MapGIS usually uses geodetic coordinates, which has strong multi-level space analysis function.MapGIS has large amount of data, diverse data input and professional data analysis functions.

Based on ObjectARX Technology
ObjectARX is a development package for secondary development on AutoCAD platform released by Auto-Desk Company.It provides an object-oriented development environment and application programming inter-face to access based on C++, which can quickly visits graphics database of AutoCAD.The program of Objec-tARX is a DLL, sharing the address space of AutoCAD, which can directly use AutoCAD's functions.DWG data can be conveniently read through ObjectARX [4].However, since the database developed by ObjectARX is actually dynamic, the second development module can only be operated when AutoCAD is started.

Based on SOUTH CASS Interface
Southern CASS system provides two kinds of plain code as data interface.One is CAS format file, which is southern CASS standard exchange format, which contains all the graphics geometry and attributes information.The data format is open, and stored in ASCII formats, which can be read directly by read program.Another is QS format ownership conversion file and it is also plain code file which contains the parcel information of land cadastral.The file contains parcel NO., parcel name, land classification, boundary point, and their coordinate, etc. User can read parcel through this file.Due to the structure limitation, lots of information will be lost, such as, when boundary line with arc is input in QS file, the arc convexity information will be lost.

Conversion File Based on DXF
DXF (Drawing Interchange Format) are widely used and became a general rule.Through DXF file format, you can use the high-level language development application to read AutoCAD graphics files.User can also create DXF file by AutoCAD.Through DXF file, the CASS graphics data can be transformed.While when the DWG file is stored in DXF file, all the attribute information will be lost.DXF only support graphic conversion, when input DXF into MapGIS system all the attribute will be lost.It will be the same when input MapGIS data into DXF.

DWGdirectX Controls
DWGdirectX provides a series of API functions which are powerful and convenient to operate DWG file format.It can quickly visit variety entity and objects of Auto-CAD and it shields version differences [5].By using VB, VC language, DWGdirectX can be independent of Au-toCAD software environment, that is, user can read and operate DWG file without open AUTOCAD software.This component can read DWG file without in AUTO-CAD application procedures.

Data Conversion Realization Based on
DWGdirectX ActiveX

Data Analysis of MAPSUV
The core of MapGIS data management is the operation of work shop.In short, workshop is a data ruler which is used to store spatial data, topological data, graphic data and attribute data.Every workshop has a corresponding MapGIS data file [6].MAPSUV inherited MapGIS workspace management data method.Ground objects are the basic unit for MAPSUV.MAPSUV based on object-oriented ideas, uses surveyed point to build ground objects method.The main data object is as follows, 1) Surveying point, it's the result of outdoor surveying, which is also the base for constructing ground objects.Every surveying point has a corresponding point on the earth.Besides basic 3D coordinates, these points have attributes such as height and coding.The surveying point structure is shown in Figure 1.
Each surveying point has a unique ID code to connect ground objects.The point and its ID code should be putted in the same file.
2) Ground object, it is a geological entity on the map which is the symbols of real objects and it's also the outdoor surveying object.According to the ground objects type and shape, it can be divided into independent ground objects (pole and lamp), linear objects (fence and lamp), facet objects (lawn).If point, line and polygon are taken as the basic geometric entity, then the ground objects are consisted by one or several entities.Ground objects are corresponding to each one-by-one with geologic entity, which can reflect the world more vividly.The structure of one ground objects in SUV is as Figure 2.
3) Annotation, it's the mark of ground objects.There are two annotations in MapSUV, one is the attribute value of ground object itself, which is marked automatically by the system and can't be deleted.The other one is attribute which is written by user or selected marked  ground objects area, then mark the annotation manually and the contents can be modified.The SUV ground objects can be read in SUV ground objects workshop.The workshop is the unit for MapGIS point, line and polygon.Ground object is the data unit for MapSUV.As for the annotation read and write in SUV, all the annotation are processed in SUV annotation workshop.

Data Analysis of SOUTH CASS
Files in South CASS are stored in DWG format.Graphical information getting from CAD is stored in primitive entity, such as reference block entity, single line entity, circle entity and composite lien entity.Attribute information is stored in graphic entity expanding attribute.Expanding data can store attribute encoding information and a number of attribute information.In this way, expanding attribute data could closely connect with graphics which helps the integrated operation of graphic and attribute and the data logic maintenance.Expanding data in AutoCAD can be divided into several blocks by APPNAME, so it is convenient to search.CASS use the same way in attribute data storage.South CASS use kinds of primitive entity of AutoCAD to express various ground objects and annotation, that is, spatial data feature or graphic type.It uses expanding data related entity to express attribute feature.

Transformation Basic Idea
The conversion of DWG files into SUV files is simply as follows, start DWGdirectX component in program to obtain interface objects in AutoCAD service program and gradually obtain AutoCAD model spatial interface object.We can get expanding data which contain code of CASS using spatial interface objects.Using code of CASS, we can adjust a graphic element's inter parameters and know whether it contains attribute information and attribute's types, then through encoding reference table to get corresponding SUV code.The entity interface can be converted by the obtained primitive type to get specific primitive entity such as, circular primitive entity and composite line primitive entity.Different functions can be extracted by different primitive entity and then we can get geological information of ground object.Finally we can convert the ground objects to SUV workshop by the functions provided by MapSUV secondary development environment.

Organize the Encode Comparison table
In transforming process, we need a coding cross-reference for CASS code and SUV code.The ground object in CASS is much fewer than that in SUV, therefore every CASS code has a corresponding code in SUV.The reference table is saved as a text file named CasToSuvCode.txt.The format in Figure 3 is as follows.

Organize the Symbols Define Table
The second step is to organize work.deffile in CASS, which divides all symbols into 21 groups.Symbols are recorded in a unified form (shown in Figure 4) and saved in work.deffile.We should know the types of landmark which are relative to CASS code.While organizing work.deffile, we extract the information code and type and save them in CASSWORK.DEF file in code size.

Data Conversion Results
We can see how DWG files displayed in its South CASS system in Figure 6, in which part of data are from Kun Ming.In Figure 7, we can see the effect of DWG files convert into SUV files.
From Figure 6 and Figure 7, we can see about 17000 landmark has been transformed and the conversion accuracy rate achieves 99%.In the transform process, read and write function actually provided by AutoCAD and MAPSUV's database which avoids the middle process of file conversion.It's more effective and has better conversion effect.

Conclusions
Both south CASS system and MAPSUV system are widely used in building cadastral database.This paper introduces a effective way to transform CASS's data into MAPSUV system.It has the following rules, 1) Convert DWG file of CASS to SUV file by DWGdirectX component, which avoids data loss of CAS file and QS file due to inherent structure.DWGdirectX can directly get data conversion data of the secondary development database provided by DWG of AutoCAD.In this way, data can be converted to SUV more accurate and the efficiency can be improved.
2) Because both CASS and MAPSUV obey general standards in building cadastre database, they have the same way to draw landmark.The most important parcel information in building cadastre database is same.Although a number of data might be lost, the data still meets the standards.

Figure 6 .
Figure 6.Data in South CASS before transformation.
[1] K. H. Wang and L. Liu, "The Study and Application on