Supermap IServer supports the generation of pre-caches that conform to the Mbtiles specification (Mbtiles is a specification developed by Mapbox that stores tile map data in a SQLite database and can be quickly used, managed, and shared. This specification is developed by Mapbox, see http://mapbox.com/mbtiles-spec/). To generate a pre-cache that conforms to the Mbtiles specification, the following conditions are true:
The map projection system for the data used is: Web Mercator.
Generate the pre-cache according to the list of scale bars in the following table. The initialization display level 0 for this scale definition contains 1 slices of 256*256 size covering the world, and defines the origin coordinates ( -20037508.34,-20037508.34). Mbtiles's slice organization conforms to the OSGeo TMS specification and is constrained by the web Mercator coordinate system (see http://wiki.osgeo.org/wiki/Tile_Map_Service_Specification# Global-mercator). The supported scale is shown in table 1 in the Map scale column.
Table 1 Mbtiles Each display level parameter list
Display level |
Map width height (pixels) |
Number of slices |
Ground resolution (M/pixel) |
Map Scale (DPI) |
0 |
256 |
1 |
156543.033928 |
1:5,916,575,27.,591,555 |
1 |
512 |
4 |
78271.516964 |
1:2,958,287,63.,795,777 |
2 |
1024 |
16 |
39135.758482 |
1:1,479,143,81.,897,889 |
3 |
2048 |
64 |
19567.879241 |
1:739,571,90.,948,944 |
4 |
4096 |
256 |
9783.939621 |
1:369,785,95.,474,472 |
5 |
8192 |
1024 |
4891.969810 |
1:184,892,97.,737,236 |
6 |
16384 |
4096 |
2445.984905 |
1:92,446,48.,868,618 |
7 |
32768 |
16384 |
1222.992453 |
1:46,223,24.,434,309 |
8 |
65536 |
65536 |
611.496226 |
1:23,111,62.,217,155 |
9 |
131072 |
262144 |
305.748113 |
1:11,555,81.,108,577 |
10 |
262144 |
1048576 |
152.874057 |
1:577790.554289 |
11 |
524288 |
4194304 |
76.437028 |
1:288895.277144 |
12 |
1048576 |
16777216 |
38.218514 |
1:144447.638572 |
13 |
2097152 |
67108864 |
19.109257 |
1:72223.819286 |
14 |
4194304 |
268435456 |
9.554629 |
1:36111.909643 |
15 |
8388608 |
1073741824 |
4.777314 |
1:18055.954822 |
16 |
16777216 |
4294967296 |
2.388657 |
1:9027.977411 |
17 |
33554432 |
17179869184 |
1.194329 |
1:4513.988705 |
18 |
67108864 |
68719476736 |
0.597164 |
1:2256.994353 |
19 |
134217728 |
274877906944 |
0.298582 |
1:1128.497176 |
20 |
268435456 |
1099511627776 |
0.149291 |
1:564.248588 |
21st |
536870912 |
4398046511104 |
0.074646 |
1:282.124294 |
22 |
1073741824 |
17592186044416 |
0.037323 |
1:141.062147 |
|
The following is an example of China400 in the sample data to illustrate the use steps.
First, open the China400 data in the desktop and confirm the projection information. As shown, the spherical Mercator projection that conforms to the specifications is required. (If the data does not meet the projection requirements, make a dynamic projection transformation of the map in the desktop)
The cache scale is then configured in the pre-cache. Select the first three scale bars in table 1 for example, as shown in:
After the cache task executes, it can be browsed in the Mbtiles Viewer (or other clients that support the Mbtiles specification). Drag the newly generated china_256x256_png.mbtiles file from the output/sqlite into the Mbtiles Viewer window, and the slices in the file are automatically rendered, as shown in the following:
Pre-cache support for Mbtiles specification