Tile Storage Format

When generating map tiles, three storage formats are available: Original, Compact, and MongoDB. The choice of storage format affects tile storage space consumption and generation time. The following sections provide detailed descriptions of these formats to help you select the most suitable option based on your data characteristics.

Original

Tiles are stored as individual image files on disk without compression, allowing direct access.

  • Tile cache directory: Consists of two components - index file (*.sci) and tile data folder. When opening tiles, only the *.sci file needs to be accessed, which references tile information from the data folder.
  • Scale directory: Uses scale denominator as folder name for custom scales, or scale level for global scales.
  • Row range: Automatically stores tiles with row numbers <128 in folder 0, 128≤row<256 in folder 1, etc.
  • Column range: Similar to row organization - stores tiles with column numbers <128 in folder 0, 128≤column<256 in folder 1, etc.
  • Tile files: Include original tiles (extension varies by format, e.g., *.webp) and solid color tiles (*.solid). Filename conventions: 65×72.webp indicates tile position (row 65, column 72); 65×75.030201.solid shows position (65,75) with color value 030201.

The Original format features:

  • Direct readability and intuitive structure
  • Larger disk space consumption with management challenges
  • No data encryption support

Compact

Builds upon Original format with compression/encryption mechanisms, using grouped files instead of individual images.

  • Tile cache directory: Maintains index file (*.sci) and tile data folder structure.
  • Scale directory: Follows same naming convention as Original format.
  • Row range: Same folder organization as Original format.
  • Tile files: Contain *.cf files and solid color tiles. Each *.cf file compresses 128×128 tile blocks (e.g., 0.cf contains columns 0-127). Solid color tiles (e.g., 030201.webp) are stored once per unique color.


The Compact format reduces file quantity, facilitating bulk data transfer. Advantages over Original format:

  • Reduced tile creation time
  • Data encryption support

MongoDB

Stores tiles as distributed documents in MongoDB databases while maintaining local index file (*.sci). Requires pre-configured MongoDB service (refer to MongoDB Feature Description). Connection parameters:

  • Server Address: MongoDB server IP (e.g., 192.168.120.42)
  • Database Name: For non-authenticated servers, select existing or create new databases via dropdown. Authenticated servers require manual entry of existing database names with admin credentials for visibility.
  • Username/Password: Required credentials for existing databases; settable for new databases.

MongoDB advantages:

  • Fast server-side tile access
  • Distributed storage facilitates data sharing and publishing
  • Direct tile data replication between MongoDB servers

Storage Format Comparison

Feature Original Compact MongoDB
Principle Uncompressed individual image files Compressed/encrypted grouped files Distributed database storage
Storage Medium Local image files Local compressed files MongoDB database
Output Components 1. Index file (*.sci)
2. Image files
3. Solid tiles (*.solid)
1. Index file (*.sci)
2. Tile data (*.cf)
3. Format-specific solid tiles
1. Local index (*.sci)
2. MongoDB documents
Advantages Direct image access 1. Fewer files for easier transfer
2. Faster generation
3. Encryption support
1. Faster server access
2. Distributed sharing capability
Disadvantages 1. Large storage footprint
2. Management complexity
3. No encryption
Non-viewable raw images Non-viewable raw images
Use Cases 1. Local viewing only
2. Small datasets
1. Encryption requirements
2. Large datasets
1. Massive datasets
2. Data distribution needs

Selection Guidelines

  • For local use with small datasets: Choose Original for direct accessibility.
  • For encrypted/large datasets: Choose Compact for efficient transfer and faster generation.
  • For massive/distributed datasets: Choose MongoDB enabling direct server-to-server replication.

Tile generation efficiency varies by format and method:

  • For Original/Compact formats: Use multi-process generation for significant efficiency gains over single-process.
  • For MongoDB: Requires pre-configured service with valid connection parameters.

Related Topics

Map Tiles

Tile Type

Advice on Using Map Tiles