MASHUP SCHEME DESIGN OF MAP TILES USING LIGHTWEIGHT OPEN SOURCE WEBGIS PLATFORM

To address the difficulty involved when using existing commercial Geographic Information System platforms to integrate multisource image data fusion, this research proposes the loading of multi-source local tile data based on CesiumJS and examines the tile data organization mechanisms and spatial reference differences of the CesiumJS platform, as well as various tile data sources, such as Google maps, Map World, and Bing maps. Two types of tile data loading schemes have been designed for the mashup of tiles, the single data source loading scheme and the multi-data source loading scheme. The multi-sources of digital map tiles used in this paper cover two different but mainstream spatial references, the WGS84 coordinate system and the Web Mercator coordinate system. According to the experimental results, the single data source loading scheme and the multi-data source loading scheme with the same spatial coordinate system showed favorable visualization effects; however, the multi-data source loading scheme was prone to lead to tile image deformation when loading multi-source tile data with different spatial references. The resulting method provides a low cost and highly flexible solution for small and medium-scale GIS programs and has a certain potential for practical application values. The problem of deformation during the transition of different spatial references is an important topic for further research. * Corresponding author: Junfu Fan, fanjf@sdut.edu.cn


INTRODUCTION
With the application and popularization of Geographic Information System (GIS) technology, the open source GIS platform software has made significant progress since the end of the 20th century and plays an increasingly important role in the field of GIS to promote the development of public geographic information services (Steiniger, 2009;Zaragozí , 2012).The open source GIS platform software, which is more flexible and economical than commercial GIS platform software, is a basic platform for the development and application of lightweight industry (Gacek, 2004).CesiumJS originated from a virtual globe project developed by Analytical Graphics, Inc. (AGI) and is an open source JavaScript library that uses Web Graphics Library (WebGL) for hardware-accelerated graphics, and it is cross-platform, cross-browser, and tuned for dynamic-data visualization for world-class three-dimensional (3D) mapping in a web browser without the need of a plug-in (Chaturvedi, 2014;Suarez, 2015;Brovelli, 2018;CesiumJS, 2018).CesiumJS supports multiple data visualization methods with the ability to request detailed server-side geospatial data.
CesiumJS, an open-source JavaScript library for world-class 3D mapping of geospatial data, supports a wide range of applications in various fields.Foreign researchers began to use CesiumJS upon its release, mainly focusing on the application and integration of its 3D functions.CesiumJS is an application program interface (API) that uses WebGL, which can be used to create thematic maps (Gede, 2016;Cardoso, 2017).With the characteristics of dynamic geospatial visualization, CesiumJS is used to visualize precipitation satellite data and is very powerful in presenting atmospheric data (Lammers, 2017).Paolantonio et al. have developed a Virtual Reality (VR) application for a virtual representation of drone flights using the popular Cesium.js3D web mapping API on an Oculus Rift, which allows users to virtually experience the flight (Paolantonio, 2015a;Paolantonio, 2015b).Cesium and PostGreSQL/PostGIS databases are used as the technical architecture of the system, which enables 3D sub-surface visualization of ground water monitoring data (Hunter, 2015).
At present, the research on CesiumJS in China mainly focuses on the business integration and function expansion of CesiumJS in various industrial applications.Based on the Cesium.jsvisualization library, Map World's image service and terrain service can be used to construct the 3D terrain scene (Sun Xiaopeng et al., 2018).A method based on Cesium globe for Global Navigation Satellite System (GNSS) orbital simulation and visualization is proposed, in which the Cesium platform with its API is used to build an application running on web browsers to visualize the object's orbits (Zhang Yu, 2017).Kan has constructed an information visualization and management system for countries along the Belt and Road based on Cesium's digital earth platform, which allows the integration, distribution, visualization, and the sharing of multivariate data across the globe via the Internet (Kan Wensheng, 2017).By exploring 3D GIS Cesium technology and unmanned aerial vehicle (UVA) technology, the paper concludes that the two applications can meet the demands of 3D urban modeling work (Zhao Xiao, 2017).
In the practical application of the GIS project, influenced by a variety of factors such as natural and man-made constraints, some data sources are missing data within specific space and time ranges in the special research area, which may affect the efficiency of the project.For this reason, it is difficult for a single map data source to satisfy the requirements of a GIS project since the diversity and coverage of the base map may lack full integrity for practical use.Nevertheless, multi-source image mashup can increase the data source and expand the space and time coverage of the base map in the study area, providing an effective approach to handle missing data.The problem is how to integrate data from different sources, with different spatial references and organization rules, a process that can easily result in the confusion and deformation of the map tiles when loading in many application scenarios.The systems function is also limited by traditional commercial WebGIS development platforms, characterized by large-scale, high-cost, and high-complexity, making it difficult to provide and achieve further base map function customization.In view of the problem to integrate multi-source data fusion using available platforms and based on the analysis of the data organization rules of the map tiles under the CesiumJS platform, this paper designs a mashup loading scheme for multi-data source loading for the purpose of implementing the offline loading of multisource tile data with different spatial references based on the CesiumJS platform.The method proposed here for the image service overlay of different spatial reference and multi-source tile data in offline maps, data fusion and integration applications provides a potential solution for extending the base map data source of GIS project applications.

Tile Data
The satellite images supported by CesiumJS are divided into two kinds: image service and offline tiles (He Lifei, 2017).Tile data sources that CesiumJS can load offline include Baidu Map, Bing Maps, Map World, and Google Maps.
Tile data mashup schemes adopt different spatial references, among which the common online map tile data spatial reference is divided into two categories: Web Mercator Projection Coordinate System (PROJCS) and World Geodetic System 1984 (WGS84) Geographic Coordinate System (GEOGCS).At the same time, CesiumJS provides access and loading support for the above two spatial reference tile data.In addition, both Map World and Google Maps support these two different spatial references.For the convenience of experimentation and comparison of the results, this paper will utilize three different data sources to carry out the experiments: Bing Maps, Map World and Google Maps.

Method of Tile Data Organization
The popularization of the electronic map has led to the more widespread use of map tile technology.At present, most electronic map and three-dimensional map websites use map tile technology based on quadtree division (Liu et al., 2009;Li et al., 2010).The organizing principle and method of tile data are as follows: the map level of the map tile data starts from level 0, and each tile data is identified by the X and Y-coordinates in order from left to right and from bottom to top.From the beginning of level No. 0 tiles, with the increase of zoom level of the map, each tile at the previous level will be divided into four equal parts and the number of tiles is increased to four times.
Generally, the size of each uniquely identified tile consists of 256*256 pixels (Nie et al., 2011).In accordance with the unique identification of the tile: zoom level number, Xcoordinate, and Y-coordinate (L, X, Y) are stored in the root folder, which is the directory structure that constructs the tile data root directory zoom level (folder name) >> X-coordinate (folder name) >> Y-coordinate (filename); and the physical storage location of each tile can be determined according to the three parameters (L, X, Y) (Lv et al., 2015).It is worth noting that the level 0 tiles are different in the way it divides the whole map under a different spatial reference, which results in a certain difference between organization methods of initial level tile data and the total number of tiles.The map tiles in the WGS84 GEOGCS have two tiles at No. 0 tiles, while the Web Mercator PROJCS has only one.

EXPERIMENTAL AND RESULT ANALYSIS
As mentioned above, CesiumJS supports loading tile data sources under two different spatial references, including WGS84 GEOGCS and Web Mercator PROJCS.It is vital to realize that different spatial references correspond to specific tiling schemes.WGS84 GEOGCS corresponds to GeographicTilingScheme, and Web Mercator PROJCS corresponds to WebMercatorTilingScheme (CesiumJS, 2018).Using the CesiumJS platform, tile data can be successfully loaded only if the correct tiling scheme is used in conjunction with the correct spatial reference.
In the experiment, the map level must start at 0 when the offline tiles load; otherwise, the offline map will have a confusing effect.For the lack of zoom level of the map, it can be pieced together according to the tile data organization rules of the corresponding spatial reference, and it is required that all the tiles consist of 256 * 256 pixels.

Scheme of Single Data Source Tile Loading
According to the method of tile data organization for the CesiumJS platform, single data source tile loading can be achieved through two image services, UrlTemplateImageryProvider and createTileMapServiceImageryProvider.
Details of the experiment are shown as follows: (1) UrlTemplateImageryProvider image service There is no doubt that the use of UrlTemplateImageryProvider image service requires tiles to conform to the method of tile data organization.The tile loading effects under WGS84 GEOGCS and Web Mercator PROJCS are shown in figure 1. Limited by the Web Mercator PROJCS method, there is no tile coverage in the polar regions, as indicated by the blue circle in figure 1-a, 1-b, and 1-c.(2) createTileMapServiceImageryProvider image service The difference between the two image services is that the createTileMapServiceImageryProvider image service needs a file named the tile map service's description file when loading the tile.It is worth noting that the tile map service's description file (Liu et al., 2015), which is downloaded with the tiles, should be stored in the tile data root folder when using the createTileMapServiceImageryProvider image service to load tiles.The file contains information about the spatial reference of tile data, tile size, downloading series and the way of extending the graphics file.There will be confusion in the loading of the map tiles if the file is missing.The tiles loading effects under WGS84 GEOGCS and Web Mercator PROJCS are shown in figure 2.
Figure 2. Tile loading effect with a single data source in 3D view It can be obtained from the above experimental results that in the case of the single data source tile loading application, CesiumJS has shown good support and no tile deformation for data tiles with these two different spatial references.Specifically, tiles assigned WGS84 GEOGCS have the same loading effect under the two kinds of image services (figure 1-d, e and figure 2-d, e).However, the effective latitude range of the map is (-85.05°S,85.05°N) under the Web Mercator projection method, which lacks map data for the polar area and does not provide global coverage (Qu et al., 2011;Wikipedia, 2018).The loading results of both image services differ in the following ways: the polar area is displayed as a raw and blue-colored sphere with no data (figure 1-a, b, c) when using UrlTemplateImageryProvide image service, while the polar area is fitted with map tiles from the edge region near the poles to map data for the polar area (figure 2-a,  b,  c) when using the Createtilemapserviceimageryprovider image service.It is clear to see that the map tile is better when the image is loaded with the createTileMapServiceImageryProvider image service under the Web Mercator PROJCS based on the experimental results.

Scheme of Multi-data Source Tile Loading
On the basis of the single data source loading scheme, a multidata source tile loading scheme, mainly conducted using different data sources and spatial references, is proposed.Three scheme scenarios were assessed: same data source with different spatial references, different data sources with the same spatial reference, and different data sources with different spatial references.
Regions of Africa and South America are selected to show the results (in 2D view to make it is easier to observe) since the shapes of the two regions are special and easier to compare.The scheme uses tiles from levels 0 to 3 to verify the tile mashup switching effect at different zoom levels to shorten the download time of the tile data; shortening the download time does not cause any errors, as reflected in the experimental results.In addition, the 2D view starts from the tiles showing level 1 for WGS84 GEOGCS, while starting from level 2 for Web Mercator PROJCS.To better display the switching and distinguishing effect under the different spatial reference tiles, the tile of the same data source is indicated by the annotation on the map, and the comparison diagram without deformation (figure 3) is placed in advance as a reference.

Figure 3. Comparison diagram without deformation in 2D view
In addition to details mentioned above, it should be noted that under the scheme of multi-spatial reference tile loading, tile data should be stored according to the corresponding tile data organization principle.For example, under the GeographicTilingScheme image service, it is necessary to match the tiles of the Web Mercator PROJCS to conform to the tile organization mode under the WGS84 GEOGCS.According to the segmentation method of the Web Mercator PROJCS, as splicing and resizing tiles after stitching occurs, the number of tiles in the folder is half the number of tiles in the series folder.
The two spatial reference tiles are then placed in the same folder, which is called by the image service object according to the GeographicTilingScheme.Similar tiling processes are required when using WGS84 GEOGCS tiles under WebMercatorTilingScheme.

Same Data Source with Different Spatial References:
The design of the tile mashup scheme under the same data source with different spatial references by using Map World tiles as an example is shown in table 1 and figure   As seen from table 1 and figure 4, the transition between WGS84 GEOGCS and Web Mercator PROJCS tiles by using two different tiling schemes under the scheme of the same data source with different spatial references will be deformed compared to the previous reference graph (figure 3).The reason for the deformation is that there is no change of tiling scheme when switching to the tile data with a different spatial reference.

Different Data Sources with the Same Spatial Reference:
The specific design details under the different data sources with the same spatial reference by using Map World and Google Maps tiles are shown in  As is shown in figure 5, the scheme of multi-data source tile loading under the same spatial reference with the transition between Map World and the Google Maps tiles does not result in tile deformation and can be used as an available tile mashup options.The experimental design, as shown in table 3 and figure 6, reveals that under the different data sources with different spatial references application scenario, tile deformation will be produced with the transition to different spatial references; this finding is consistent with the experiment of the schemes under the same data source with a different spatial reference scenario.

Different
Overall, the results for the scheme of multi-data source tile loading show that it can be loaded into the CesiumJS with different views.In the case of the same spatial reference scenario, tile mashup displays a good visual effect, but the scenario of different spatial reference tile mashup results in deformity.The direct reason for the deformation of tile mashup is that it is unsuitable and inconsistent to use only one tiling scheme for the transition between different spatial references such as WGS84 GEOGCS and Web Mercator PROJCS.To be more specific, as an example, the tile data set with the Web Mercator PROJCS is loaded under the GeographicTilingScheme image service, and the tiles of the Web Mercator PROJCS need to be spliced and cut so that they conform to the rules of tile data organization of WGS84 GEOGCS.After splicing and cutting, the size of the tile is 256*512 or 256*128 pixels and needs to be adjusted to 256*256 pixels.The adjustment of tile size leads to the deformation of compression or stretching in the vertical direction, which results in the loading of the original offline map tile producing the deformation problems, as shown in figure 4 and figure 6.

CONCLUSIONS
In view of the difficulty of integrating multi-source data fusion using current and large-scale commercial GIS platforms, which cannot flexibly meet the demands of deployment and application of GIS projects, this in-depth paper studies the multi-source data integration application scheme based on the CesiumJS open source platform.We designed two kinds of schemes including the single data source loading scheme and the multi-data source loading scheme.The display effect and related problems, involving multi-source third-party map tile data offline deployment and application localization based on CesiumJS, were analyzed and discussed.The experiment involving the single data source tile loading scheme illustrates that single data source tiles can be loaded successfully by the two kinds of image services, which behave differently in the polar area.The createTileMapServiceImageryProvider image service, which is more suitable as a single data source tile loading mode of choice, uses interpolation to fill in the data for the polar area.The purpose of the multi-data source loading scheme is to handle the multi-spatial reference, multi-source tile data and the seamless switching within the same globe.In the case of the same spatial reference, the scheme of multi-data source loading has good visual appearance, which has no problem with tile deformation and confusion.However, when under a different spatial reference, the tiling scheme is not applicable to the spatial reference, which is the reason why it leads to tile deformation.The scheme of the multi-data source tile loading with a transition between the same spatial references can be used as an available tile mashup option.
This paper explores and studies the offline deployment and application scheme design of multi-source and multi-spatial reference tile data based on the CesiumJS platform, which has solved the problem of flexible integration of multi-source map tile data fusion to an extent that the existing platforms cannot address; the scheme has some practical application value as well.However, the scheme of multi-data source loading under the different spatial references in this paper still has the problem of deformation and will be further studied in an upcoming part of this paper.

Figure 1 .
Figure 1.Tile loading effect with a single data source in 3D view

Figure 4 .
Figure 4. Diagram under the same data sources with different spatial references (with deformation)

Figure 5 .
Figure 5. Diagram under the different data sources with the same spatial references (no deformation)

Figure 6 .
Figure 6.Diagram under the different data sources with different spac e references (with deformation)

Table 1 .
4, with four different renderings corresponding to table 1. Design under the same data source with different spatial references

Table 2 .
Design under the different data sources and same spatial reference

Data Sources with Different Spatial References:
The design of tile mashup scheme under the different data sources with different spatial references by using Map World and Google Maps tile as examples is shown in table3.

Table 3 .
Design under the different data sources and different spatial references Global Navigation Satellite System; PROJCS, Projection Coordinate System; WGS84, World Geodetic System 1984; GEOGCS, Geographic Coordinate System; UVA, Unmanned Aerial Vehicle.