At Generate Map Tiles, three TileStorage Formats are provided: Raw, Compact, and MongoDB. The selection of different Storage Formats will have a certain impact on the space size and generation time of the Tile. The following is a Detail Description of the three formats. You can select the appropriate TileStorage Format according to the data situation.
Original
The Tile file is stored on the disk in a separate Picture File format, and the data is not compressed and can be read directly.
- Tile cache directory: It includes two parts: index file (*.sci) and Tile Data folder. When opening Tile, you only need to open the *.sci file, and the Tile Info in the Tile Data folder will be read according to the File Info.
- Scale Directory: If Custom Scale is selected when producing Map Tiles, the scale denominator is used as the file name; if Global Scale is selected, the scale level is used as the file name.
- Line range: during Tile production, Tile in the range of < 128 lines will be automatically stored in the 0 folder, and Tile in the range of 128 ≤ lines < 256 will be stored in the 1 folder, and so on;
- Column range: the same as row range, 0 folder stores Tile with column range of < 128, 1stores Tile with column range of 128 ≤ < 256, and so on;
- Tile file: Includes the original tile file (*.webp changes according to the tile format) and the solid tile file (*.solid). In the 65 × 72.webp file name, 65 × 72 represents the Position Info of the Tile (65 rows, 72 columns); In the file name of 65 × 75.030201.solid, 65 × 75 is the column Position Info of the Tile (65 rows, 75 columns), and the 030201 represents the color value.
The raw Storage Format has the following characteristics:
- It can be read directly and is more intuitive.
- It takes up a lot of disk space, is not easy to manage, and is not easy to copy and migrate.
- Encryption of data is not supported.
Compact
On the basis of the original Storage Format, a certain compression and encryption mechanism is used for the Tile file, and a group of files are used to replace the image format of the original Storage Format in structure.
- Tile cache directory: It includes two parts: index file (*.sci) and Tile Data folder. When opening Tile, you only need to open the *.sci file, and the Tile Info in the Tile Data folder will be read according to the File Info.
- Scale Directory: If Custom Scale is selected when producing Map Tiles, the scale denominator is used as the file name; if Global Scale is selected, the scale level is used as the file name.
- Line range: during Tile production, Tile in the range of < 128 lines will be automatically stored in the 0 folder, and Tile in the range of 128 ≤ lines < 256 will be stored in the 1 folder, and so on.
- Tile files: include *.cf and solid-color tiles (*.webp varies according to tile format). In the 0.cf folder, 0 represents all tiles in the < 128 column (1 represents 128 ≤ column < 256 range, and so on), that is, a.cf file will compress tiles in the 128 × 128 range; The 030201.webp file name indicates a Tile whose color value is a 030201, and a solid color Tile with the same color value is saved only once;
Compact Storage Format reduces the number of files and facilitates the transfer and copying of large amounts of Tile Data. The compact Storage Format has the following advantages over the original Storage Format:
- Reduce the amount of time spent on Tile creation.
- Data supports encryption.
MongoDB
MongoDB Storage Format means that the generated Tile file is stored in the server's database in a distributed format, and an index file (*.sci) is generated locally. If the MongoDB Storage Format is selected, the MongoDB service needs to be started first. Please refer to the MongDB Instructions for useStart service . The Parameter Description for Connection Info is as follows:
- Server address: It is used to set the MongoDB server address, for example, 192.168.120.42.
- Database Name: Used to set the Database Name. If the server starts MongoDB in a non-user authentication mode, you can click the Drop-down Button to select an existing database in the server, or directly enter a new Database Name to create a database; If the server starts MongoDB with user authentication, New Database is not supported, and the existing Database Name cannot be read. Only the existing Database Name can be entered in the text box. If the administrator user name and password are entered in User Name and Password, You can see the Database Name that already exists in the library in the Database Name drop-down.
- Username/Password: If the database already exists, you need to enter the Username and password corresponding to the database; if it is a new database, you need to set the database Username and password.
MongoDB has the following advantages over other Storage Formats:
- Tile is stored in the server, and the access speed of Map Tiles is faster.
- Store in a distributed format for Data Share and publishing.
- Tile Data stored in MongoDB supports direct copy distribution, which can copy data from one MongoDB server to another MongoDB server, facilitating data transmission and backup.
Comparison of different Storage Formats
Options | Original | Compact | MongoDB |
Principle | Slice files are stored on disk in a separate Picture File format, uncompressed, and can be read directly | The original slice file is compressed and encrypted, and a group of files are used to replace the Tile mechanism of the original image format. | The generated Tile slice file is stored in the server's database in a distributed format |
Storage medium | Local Picture File | Local zip file | Mongo database |
Slice results | 1.Index Files (*.sci) 2. Picture File 3.Solid Tile files (*.solid) |
1.Index Files (*.sci) 2. Tile Data(*.cf) 3. Solid Tile corresponding to the image format |
1.Local Tiles Index Files (*.sci) 2. MongoDB Tile Documentation |
Advantage | Picture File can be read directly | 1. Fewer files for data transfer and copying 2.TileDate Created Short 3. Support data encryption |
1.Tile Storage in the server, read faster 2. Store in distributed format for Data Share and publishing |
Shortcoming | 1. Large disk space consumption 2. Not easy to manage (copy, migrate) 3. Data encryption is not supported |
Not the original picture, cannot be viewed directly by Open Image | Not the original picture, cannot be viewed directly by Open Image |
Applicable conditions | 1. Only browse locally after cache generation 2. Tile with small amount of data |
1. Need for data encryption; 2. Large amount of data |
1.Large volume of data; 2. Data to be copied and distributed |
Select the suggestion
- There is no need to copy, and it can only be browsed locally. In the case of small amount of data, it is recommended to select Original Storage Format, which is convenient and intuitive to read.
- When data encryption is required and the amount of data is large, it is recommended to select Compact Storage Format, which can reduce the number of files, facilitate the transmission and copy of Tile Data, and shorten the time to create Tile.
- It is recommended to select MongoDB Storage Format when there is a large amount of data and the data needs to be copied and distributed. The Tile Data stored in MongoDB supports direct copy and distribution, and the data can be copied from one MongoDB server to another. And is favorable for data transmission and backup.
For different TileStorage Formats, the selection of different graph cutting methods will have a certain impact on the efficiency of graph cutting. Through repeated testing and verification, the following conclusions are analyzed and summarized:
- Select the original and compact Storage Format. It is recommended to use the Generate Map Tiles by Multiple Tasks, which can significantly improve the cutting efficiency compared with the single-task cutting. However, on the basis of the full process, new tasks are added, and the efficiency improvement is not obvious.
- When selecting a MongoDB Storage Format, you need to start the MongoDB service first, and input Connection Info such as server address and Database Name.
Related topics
Recommendations for using Map Tiles