# Nine Tiles Model Construction and Cache of CGML in Mobile

Authors: Aiguo Zhang; Jian Deng; Haijun Luan; Qunyong Wu
Journal: Journal of Sensors
 (2015)

---

## Abstract

Document management is a usual way to organize spatial data in mobile terminals. And the compressed CGML spatial data has been widely used in location based services. Referring to the thoughts of map set in cartography, nine closely connected and equal sized rectangles are used as the scope for requesting mobile map data, and these nine closely connected rectangles are built to be nine tiles model. Therefore, in view of the method of block requesting and storing on mobile spatial data following nine tiles model, as well as the large quantity of mobile spatial data and its complex geometry relation, this paper puts forward the construction mechanism of nine tiles model and cache organization of CGML spatial data in mobile terminals that abide by nine tiles model. This way of organization and management of mobile spatial data is good to increase the efficiency of heavy spatial data accessing in the low band and reliability of wireless network environment.


---

## Body

## 1. Introduction

The popularity of smart phones prompts a rapid development of location-based services. As the base of mobile location services, organization and management of spatial data has been paid more and more attention by researchers. Imielinski and Badrinath (1993) had a discussion on query optimization and strategy updating of location information for the mobile environment [1]. Massari et al. (1996) give a query processing tool that is suitable for mobile database applications and based on QBI (Query by Icons) model, which takes into account the inherent defects in the mobile environment and allows any database query structure and location knowledge query [2]. T. Wang and L. Wang (2001) draw a comparison on the performance and evaluation of embedded database products, which provides a reference for the selection of embedded database [3]. Li et al. (2002) proposed a vector data block data structure model for mobile terminal equipment as the representative for the Pocket PC. The block using the method of the vector in the same amount of space GIS data condition shows some improvement on the rate [4]. With the development that handheld computer (PDA), mobile phones, and other smart devices can support higher color resolution and have more computing power, mobile location service system needs to start more graphic images in the form of electronic maps to provide users with different levels of detail and more scale representation of information [5, 6]. Established a navigation database system for the application requirements of intelligent transportation and location-based services [7, 8]. The research and use of navigation database, to some extent, contributed to the development of mobile location-based services and intelligent transportation. Xu et al. (2005) studied the dynamic organization Kiwi display data in memory, improved the secondary cache map display method, and proposed double buffer pool map display (data buffer pool and maps bitmap buffer pool) strategy in the analysis of the underlying data storage organization Kiwi display method [9]. Open source Berkeley DB embedded database SQLite has been widely used because of its lightweight and fast and excellent performance [10–12]. Wan et al. (2006) analyzed in detail on SQLite and Berkeley DB from the structure, calling between subsystems, and the course of system performing [13]. Wang (2008) proposed the so-called objective interpolation method using a big and a small scale under different levels of detail related information between the expressions of the target to derive the expression of the target under the middle of the scale [14]. Zhou et al. (2010) studied data organization and storage of navigation electronic map in the embedded system, proposed the use of geographic data block for data storage, and did a research on treatment of data breakpoint because data storage method for geographic data caused the inconsistency of date [15]. Dong and Li (2001) and Zha et al. (2010) did a research on spatial data storage for SVG, SVG express spatial information, the server side data block, hierarchical data transmission, mobile data terminal performance, SVG data storage, and other key technologies according to server side terminal of mobile SVG and half load balanced LBS architecture [16, 17]. Yang and Fei (2010) proposed the methods of data transferring in ad hoc networks by geographic routing [18, 19]. Xu et al. (2012) analyzed the current issues in geographic information systems and spatial coordination between multiserver data sharing and interoperation, introduced P2P-based peer network node scheduling and routing query technology, created and published WEB services, adopted multiunified source data access strategy to achieve mobile network terminal management, session management, spatial data management, and other functions, and conducted level management group of nodes according to the quality of service to play an efficiency on P2P spatial data management and query [20]. In order to improve the organization and management efficiency of multisource heterogeneous data in the collection process of mobile geographic information system, Li et al. (2012) proposed a data model based on exchangeable image file (EXIF) principle of digital image data fusion vector space model form and the general location of the attribute information in view of the limitations of existing analysis methods and data on its structure. Spatial location and general properties of the model will be embedded into the physical structure associated with the digital image in order to achieve a high degree of integration associated data and it depends that model designed and developed the external data acquisition system used in industry, resource management, and decision analysis [21].As can be seen from the above research, the data management of mobile terminals is mainly in two ways: file data management and embedded database management. The requirements on terminals for file data management are low, and the file management is now more commonly used as data management compared to database management. This paper follows the document management and proposes a mechanism to build nine tiles model and cache organization of CGML (compact geographical markup language) spatial data.


## 2. Construction Mechanism of Nine Tiles Model

In order to raise the speed of map display and the quality of graphics, nine tiles of spatial data centered the real position of terminal and in the size of terminals screen is cached, which is abided by the data organization of nine tiles model.


### 2.1. The Naming Rules of Nine Tiles Model Rectangles

Nine tiles model made reference to the thought of cartography and its map set [22], and the scope of requesting map data is determined by the size of terminal screen and nine close conjoint rectangles that are in some scale. Nine tiles model is formed by such nine close together rectangles, such as Figure 1.Figure 1
Relation of nine tiles model rectangles.The centered rectangle is the core frame (“0” in Figure1), and all the nine rectangles form the nine tiles model.For quickly and accurately obtaining mobile map data, name of each rectangle in the nine tiles model is unique. Naming of each rectangle includes three parts, which are LOD (level of detail) value and INT values of left top point coordinates. For example, LOD is 1000, and left top coordinates are (72705, 2885486); then the name of the rectangle is 1000_72705_2885486. This method makes all the rectangles exist with certain regularity, which can build relation between two rectangles in the same LOD by the numbers of frames among them. In other words, giving two names of rectangles, their accurate position relations can be deduced.Unique name of each rectangle is advantageous to quickly and accurately find out spatial data from CGML data in terminal and obtain the scope of map from the database server.


### 2.2. The Dynamic Generation of Nine Tiles Model Rectangles

At the mobile map service, terminal screen is corresponding to nine tiles model core frame, and the outer rectangles save cached data. Data do not need to be requested from server if screen center is in the nine tiles model core frame. In addition, new nine tiles model should be built in terms of this moment’s screen center.The course of building new nine tiles model is called dynamic generation. Therefore, some approaching rectangles will be added or deleted in light of the real position of screen center. The dynamic generation sketch of nine tiles model by the screen center transferring among different rectangles with different colors is shown in Figure2.Figure 2
Dynamic creation of nine tiles model rectangles.


## 2.1. The Naming Rules of Nine Tiles Model Rectangles

Nine tiles model made reference to the thought of cartography and its map set [22], and the scope of requesting map data is determined by the size of terminal screen and nine close conjoint rectangles that are in some scale. Nine tiles model is formed by such nine close together rectangles, such as Figure 1.Figure 1
Relation of nine tiles model rectangles.The centered rectangle is the core frame (“0” in Figure1), and all the nine rectangles form the nine tiles model.For quickly and accurately obtaining mobile map data, name of each rectangle in the nine tiles model is unique. Naming of each rectangle includes three parts, which are LOD (level of detail) value and INT values of left top point coordinates. For example, LOD is 1000, and left top coordinates are (72705, 2885486); then the name of the rectangle is 1000_72705_2885486. This method makes all the rectangles exist with certain regularity, which can build relation between two rectangles in the same LOD by the numbers of frames among them. In other words, giving two names of rectangles, their accurate position relations can be deduced.Unique name of each rectangle is advantageous to quickly and accurately find out spatial data from CGML data in terminal and obtain the scope of map from the database server.


## 2.2. The Dynamic Generation of Nine Tiles Model Rectangles

At the mobile map service, terminal screen is corresponding to nine tiles model core frame, and the outer rectangles save cached data. Data do not need to be requested from server if screen center is in the nine tiles model core frame. In addition, new nine tiles model should be built in terms of this moment’s screen center.The course of building new nine tiles model is called dynamic generation. Therefore, some approaching rectangles will be added or deleted in light of the real position of screen center. The dynamic generation sketch of nine tiles model by the screen center transferring among different rectangles with different colors is shown in Figure2.Figure 2
Dynamic creation of nine tiles model rectangles.


## 3. CGML Mobile Spatial Data

GML (geographical markup language) [23] released by OGC/TC211 organization is the transmission and exchange standard between international geography spatial; however, there are two disadvantages when it is used to spatial data visualization directly. One is a large amount of data; another is difficulty to bear for projection at low quality terminal. CGML is a mobile geospatial data which use the dictionary compression way [24]. CGML document is mainly composed of two parts; one is the structure of the document tag, and another is the properties of the document and geometric data. The compression of GML to CGML data can also be divided into two parts, which are the compression of mark and coordinate geometry data. Considering that the mobile terminal screen is small, and the spatial data that need to cache is not large, at the same time to reduce the amount of calculation that subsequent map operation CGML cache data update, the compression of the GML to CGML document markup in terminal is adopted. The compression of main tag is as shown in Table 1.Table 1
The tag compression of CGML to GML.
GML
CGML
Compress ratio
FeatureCollection
Ftcl
78%
Feature
Ft
75%
Description
Info
64%
LineString
LnSt
60%
LinearRing
LnRn
60%
Polygon
Plgn
43%
MultiGeometry
MlGeo
62%
MultiPoint
MlPoint
30%
MultiLineString
MlLnSt
60%
MultiLinearRing
MlLnRn
60%
MultiPolygon
MlPlgn
50%
OuterBoundaryIs
ex
87%
InnerBoundaryIs
in
87%
Coordinates
cds
73%CGML is text-based and compressed and has gradually developed into an exchange and transmission standard between different mobile spatial data. The spatial data file followed the CGML format standard is CGML file.


## 4. CGML Cache in Mobile Terminals

The operations of mobile map need to constantly request spatial data; if all the data is obtained directly from the database server, much delay will be last for map browsing with narrow bandwidth, low reliability wireless network. However, the mobile terminal caches some spatial data according to changes in the operation of the moving map which can make the visualization process directly load local data and enable fast-moving map visualization. Combined with the characteristics of CGML, mobile terminal caches spatial data in CGML file format, and the specific cache framework of CGML data in terminals is shown in Figure3.Figure 3
Mobile CGML cache architecture.In the framework above, the initial nine tiles model rectangular data is obtained when mobile user initiates a mobile map service request at the first time. These map data will be in the form of three types of files cached in terminal. The first category are the CGML files corresponding to all the single rectangular boxes, and each nine tiles model includes nine pieces of CGML documents; the second is a list file including all the names of CGML files, and it is also an index document for spatial data query; the third is the merger of nine rectangular boxes of CGML files, which is directly used for mobile map visualization.With map operating, mobile terminal screen center will be out of core frame of nine tiles model, and new rectangle data need to be requested. Data received in terminal will be operated in three parts; one is to add all new rectangle CGML files to the corresponding file directory, and the second is to add the new file name to the list file; then the third is to incorporate new nine tiles model rectangle CGML files according to the current core frame for mobile map visualization. As there are many times of mobile map services request in location based services, the operation of the map data cache is the same analogize.


## 5. The CGML Data Organization Followed by Nine Tiles Model

In a mobile map service, the spatial data queried according to nine tiles model is cached with CGML file formats in the mobile terminal. In order to effectively utilize these spatial data cached, it must be reasonably organized. The spatial data file cached includes all single CGML files and nine tiles model box CGML file. The relationship between the two types of files is shown in Figure4.Figure 4
Relation between single CGML files and nine tiles model CGML file.As can be seen from the diagram, all the cached individual rectangle CGML files are independent, such as a list of files in the middle level, and they are the basis of merging nine tiles model CGML documents, such as the nine tiles model centered by CGML34 and nine tiles model centered by CGML43. Obviously, a single rectangle CGML file may be reused in merging of nine tiles model CGML file.In the physical organization of CGML data files, all generated CGML files are stored in the same directory. And once CGML documents are obtained by mobile query, the file name and data will not be changed.New nine tiles model CGML file merged from nine single CGML will be named like “nm” adding core frame filename. In the specific combination, the <Ft> elements of each document CGML files accumulated to form a new integrated CGML file. For example, nine tiles model core frame name is 10000_726118_2889932.xml, and its corresponding nine tiles model CGML filename is nm_10000_726118_2889932.xml.At the same time, in order to accelerate the efficiency in finding and comparing CGML file, the name of list file is “all” adding initial core frame filename.


## 6. Conclusion

Mobile data management is an important part of distributed data management. The core frame of nine tiles model rectangle that is built with mobile terminal real-time position and screen size is current range, and outline frame is the cached data. All of the terminal cache data is organized with CGML files in accordance with the rules of the nine tiles model, which has active significance for the mobile map visualization.



---

*Source: 867580-2015-10-28.xml*