SuperMap iDesktop provides three of map caches in SuperMap: compact, original, and MongoDB. Tile storage types have influences on the resulting tile size and the spent time.
Original
Tile files are stored in the disk as images without compressing. The resulting data includes two parts: index files (.sci) and the tile data. All tiles are saved in multiple folders. If there are pure-color tiles, a corresponding information file (.solid) will be created in the folder.
Pure color tiles are only saved once, which reduces data redundancy a lot. The following picture shows a part of the resulting data. Among them, JPG images are tiles, and .solid files are pure color tile information files. Of the name of 0×0.eab991.solid, 00 means the position of the tile, while eab991 is the value of pure color. There is a pure color tile (JPG) corresponding with the color. Therefore, the application can find out the specific tile conveniently when reading tiles.
It has the following characters:
- Can be read directly.
- Takes relatively large disk space and hard to manage, copy, or move.
- Can not set password.
Compact
The tile files are compressed and encrypted. The original files are replaced by a group of other files. The tile data of different scales is a group of files that is composed of two parts: index file (.sc) and a group of tile data. Of which, index data employ a group of files to replace the original image formats. Tile data is saved in a compact file (.cf). If there are pure color tiles in a scale, the application will generate pure color tiles in the related folder.
Comparing with original type, the compact type has the follow superiorities:
- With less files, it is easy to transfer and copy.
- Shorten the time cost for creating the cache.
- Support data encryption.
MongoDB
When using MongoDB to save tiles, the generated tiles will be stored in distribution in the MongoDB database. At the same time, an index file (*.sci) will be produced and saved in your local machine. The MongoDB-based distributed tile service only supports tiles 5.0. To save tiles in the MongoDB database, you are required to run MongoDB service first. Please refer to MongoDB Instruction for more detail. The following content details parameters on database connection.
- Server name: set the address of the MongoDB server, such as 192.168.120.42.
- Database name: set the database name. When you start MongoDB service in the non-authentication mode, you can either select an existing database from the dropdown list or enter a new name directly to create a new database. But if you start MongoDB service in the authentication mode, you must enter an existed database name with the correct username and password to connect the database successfully.
- Username/password: If you want to use an existing database, you need to enter the account name and password. But if you want to create a new database, you are required to enter an account name and password.
Compared with other types of tiles, MongoDB has advantages listed below.
- Saving tiles in a server speeds up the data accessing.
- Using the distributed formats to save data is much convenient for data sharing and publishing.
- Data saved in MongoDB can be copied and pasted from one server to another server, which is easy to transmit and backup data.